-
Notifications
You must be signed in to change notification settings - Fork 0
Handle permanent and device path for megaraid volumes #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
933d73b
Fix lint for mdadm
TeddyAndrieux 7f83728
megaraid: Handle special case for permanentPath of logical volume
TeddyAndrieux f5a1439
megaraid: Handle device path and permanent path for JBOD drives
TeddyAndrieux 082f5c4
megaraid: Avoid issue where DG is a string
TeddyAndrieux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 20 additions & 2 deletions
22
pkg/implementation/raidcontroller/megaraid/mocks/PathResolver.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
pkg/implementation/raidcontroller/megaraid/testdata/logicalvolumes/show/v228.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"Controllers":[{"Command Status":{"CLI Version":"007.1616.0000.0000 Dec 24, 2020","Operating system":"Linux 4.18.0-553.22.1.el8_10.x86_64","Controller":0,"Status":"Success","Description":"None"},"Response Data":{"/c0/v228":[{"DG/VD":"11/228","TYPE":"RAID0","State":"Optl","Access":"RW","Consist":"Yes","Cache":"RWTD","Cac":"-","sCC":"ON","Size":"16.370 TB","Name":""}],"PDs for VD 228":[{"EID:Slt":"251:12","DID":1,"State":"Onln","DG":11,"Size":"16.370 TB","Intf":"SAS","Med":"HDD","SED":"N","PI":"N","SeSz":"512B","Model":"ST18000NM000D ","Sp":"U","Type":"-"}],"VD228 Properties":{"Strip Size":"256 KB","Number of Blocks":35155607552,"VD has Emulated PD":"Yes","Span Depth":1,"Number of Drives Per Span":1,"Write Cache(initial setting)":"WriteThrough","Disk Cache Policy":"Disk's Default","Encryption":"None","Data Protection":"None","Active Operations":"None","Exposed to OS":"Yes","OS Drive Name":"/dev/sda","Creation Date":"20-04-2023","Creation Time":"08:30:11 AM","Emulation type":"default","Cachebypass size":"Cachebypass-64k","Cachebypass Mode":"Cachebypass Intelligent","Is LD Ready for OS Requests":"Yes","SCSI NAA Id":"600062b212da5d402bd3b493e1699377","Unmap Enabled":"No"}}}]} | ||
| {"Controllers":[{"Command Status":{"CLI Version":"007.1616.0000.0000 Dec 24, 2020","Operating system":"Linux 4.18.0-553.22.1.el8_10.x86_64","Controller":0,"Status":"Success","Description":"None"},"Response Data":{"/c0/v228":[{"DG/VD":"11/228","TYPE":"RAID0","State":"Optl","Access":"RW","Consist":"Yes","Cache":"RWTD","Cac":"-","sCC":"ON","Size":"16.370 TB","Name":""}],"PDs for VD 228":[{"EID:Slt":"251:12","DID":1,"State":"Onln","DG":11,"Size":"16.370 TB","Intf":"SAS","Med":"HDD","SED":"N","PI":"N","SeSz":"512B","Model":"ST18000NM000D ","Sp":"U","Type":"-"}],"VD228 Properties":{"Strip Size":"256 KB","Number of Blocks":35155607552,"VD has Emulated PD":"Yes","Span Depth":1,"Number of Drives Per Span":1,"Write Cache(initial setting)":"WriteThrough","Disk Cache Policy":"Disk's Default","Encryption":"None","Data Protection":"None","Active Operations":"None","Exposed to OS":"Yes","Creation Date":"20-04-2023","Creation Time":"08:30:11 AM","Emulation type":"default","Cachebypass size":"Cachebypass-64k","Cachebypass Mode":"Cachebypass Intelligent","Is LD Ready for OS Requests":"Yes","SCSI NAA Id":"600062b212da5d402bd3b493e1699377","Unmap Enabled":"No"}}}]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package utils | ||
|
|
||
| import "os" | ||
|
|
||
| // FileExists checks if a file exists at the given path. | ||
| func FileExists(path string) bool { | ||
| _, err := os.Stat(path) | ||
| return !os.IsNotExist(err) | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You VSCode told you to do that ? Because cursor keep doing this modification without me asking for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it's golangci-lint that did it automatically (version 2.0.2 here)