-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Add support for AWS EBS on windows #79552
Conversation
/sig aws |
/sig windows |
dir := deviceMountPath | ||
if runtime.GOOS == "windows" { | ||
// FormatAndMount will mklink here, avoid "Cannot create a file when that file already exists" | ||
dir = filepath.Dir(deviceMountPath) |
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.
Im still a bit confused why this is needed, could you add some more details? The same to the later change at SetUpAt
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.
updated, lemme know if it makes sense now.
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.
that's the correct behavior, I did the same implementation on other place for windows too.
84fbf82
to
623f7fd
Compare
This is ready for review. I turned on e2e tests in the 2nd commit, I ran DynamicPV ones locally and they passed. Also tested the patch manually. |
/test pull-kubernetes-e2e-gce-100-performance |
1 similar comment
/test pull-kubernetes-e2e-gce-100-performance |
also related kubernetes/enhancements#1122 https://github.com/kubernetes/enhancements/pulls/1141 Can you take a look at that? It would be good to make sure this can feasibly be migrated out of tree later |
fb57e4c
to
c397e1d
Compare
/lgtm |
/assign @gnufied |
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.
Mostly looks good. some tests would be nice.
return "", fmt.Errorf("disk not found in ebsnvme-id.exe output: %q", string(output)) | ||
} | ||
return matches[1], nil | ||
} |
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.
Do we need some tests for this code?
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.
don't think it would be too useful, I would basically be testing the regex expression, & the only way to verify it is correct is to test against actual (not copy/pasted) ebsnvme-id.exe output. if e.g. the format of ebsnvme-id.exe changes someday, e2e will catch it & error will propagate.
diskRe := regexp.MustCompile( | ||
`Disk Number: (\d+)\s*` + | ||
`Volume ID: ` + volumeID + `\s*`) | ||
matches := diskRe.FindStringSubmatch(string(output)) |
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.
Is the output a list with all devices present? i.e:
Disk Number : 1
Volume ID: ...
Device Name: ....
Disk Number: 2
Volume ID: ...
Device Name: ....
?
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.
yeah
/lgtm |
/retest |
@gnufied require your /approve as well pls . Thanks. 👍 |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, leakingtapan, wongma7 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it: Currently, EBS WaitForAttach on windows nodes fails because the EBS driver looks for the device at some Linux-specific /dev/xxxxx path which doesn't exist on Windows. Nothing prevents the scheduling of windows pods using EBS to windows nodes, so the pods end up stuck pending. Windows nodes are already GA, so fix it.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
TODO: add Get-Disk fallback or maybe not.
TODO: e2e test?
Does this PR introduce a user-facing change?: