-
Notifications
You must be signed in to change notification settings - Fork 807
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
Grab snow device path via last character rather than trimming #1546
Conversation
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.
/lgtm
@TerryHowe: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
@@ -101,7 +101,7 @@ func (d *nodeService) findDevicePath(devicePath, volumeID, partition string) (st | |||
|
|||
if util.IsSBE(d.metadata.GetRegion()) { | |||
klog.V(5).InfoS("[Debug] Falling back to snow volume lookup", "devicePath", devicePath) | |||
canonicalDevicePath = "/dev/vd" + strings.TrimPrefix(devicePath, "/dev/xvdb") | |||
canonicalDevicePath = "/dev/vd" + devicePath[len(devicePath)-1:] |
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.
np: Can you add a comment here explaining why you're doing this?
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.
For my own understanding: the 26-volume limit doesn't exist for the current implementation, correct?
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.
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.
Why both? I thought the 26-device limitation was from this change taking only the last character of devicePath
while the current implementation just trims the prefix.
Due to kubernetes-sigs#1518, volumes now start with /dev/xvda rather than /dev/xvdb. Because of this, the hardcoded path in the snow code stopped working, breaking mounting on snow devices. This change instead creates the snow device path based on the last character of the generated path, rather than trying to do it via trimming, which is unreliable. Snow devices are currently limited to 10 volumes attached which makes this 100% safe, but this will need to be revisited if snow ever adds suport for >26 volumes. Signed-off-by: Connor Catlett <[email protected]>
/retest Is this the new test breakage :( |
/retest Prow was actually broken, hopefully fixed now: kubernetes/test-infra#29167 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TerryHowe, torredil The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Is this a bug fix or adding new feature?
Bug fix
What is this PR about? / Why do we need it?
Due to #1518, volumes now start with /dev/xvda rather than /dev/xvdb. Because of this, the hardcoded path in the snow code stopped working, breaking mounting on snow devices. This change instead creates the snow device path based on the last character of the generated path, rather than trying to do it via trimming, which is unreliable.
Snow devices are currently limited to 10 volumes attached which makes this 100% safe, but this will need to be revisited if snow every adds suport for >26 volumes.
What testing is done?
Manual (with snow customer), added additional unit test case