Skip to content
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

Merged
merged 2 commits into from Jul 24, 2019

Conversation

@wongma7
Copy link
Contributor

commented Jun 29, 2019

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?:

Add support for AWS EBS on windows
@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2019

/sig aws
/sig storage

@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2019

/sig windows

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch from 4f388ea to 5abf873 Jul 1, 2019

dir := deviceMountPath
if runtime.GOOS == "windows" {
// FormatAndMount will mklink here, avoid "Cannot create a file when that file already exists"
dir = filepath.Dir(deviceMountPath)

This comment has been minimized.

Copy link
@leakingtapan

leakingtapan Jul 1, 2019

Contributor

Im still a bit confused why this is needed, could you add some more details? The same to the later change at SetUpAt

This comment has been minimized.

Copy link
@wongma7

wongma7 Jul 1, 2019

Author Contributor

updated, lemme know if it makes sense now.

This comment has been minimized.

Copy link
@andyzhangx

andyzhangx Jul 18, 2019

Member

that's the correct behavior, I did the same implementation on other place for windows too.

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch from 5abf873 to ced6185 Jul 1, 2019

@PatrickLang PatrickLang added this to Backlog (v1.16) in SIG-Windows Jul 2, 2019

@PatrickLang PatrickLang moved this from Backlog (v1.16) to In Progress+Review in SIG-Windows Jul 2, 2019

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch 2 times, most recently from 84fbf82 to 623f7fd Jul 2, 2019

@wongma7 wongma7 changed the title WIP: Add support for AWS EBS on windows Add support for AWS EBS on windows Jul 2, 2019

@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2019

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.

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch from 975602e to 56f5e80 Jul 2, 2019

@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2019

/test pull-kubernetes-e2e-gce-100-performance

1 similar comment
@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

/test pull-kubernetes-e2e-gce-100-performance

@PatrickLang

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2019

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

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch from 02b8600 to 2ed4679 Jul 17, 2019

@k8s-ci-robot k8s-ci-robot added size/L and removed size/M labels Jul 17, 2019

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch 2 times, most recently from fb57e4c to c397e1d Jul 17, 2019

@leakingtapan

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

/lgtm
/approve

@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jul 22, 2019

/assign @gnufied
Please approve, TY

@gnufied
Copy link
Member

left a comment

Mostly looks good. some tests would be nice.

Show resolved Hide resolved pkg/volume/awsebs/attacher_windows.go Outdated
return "", fmt.Errorf("disk not found in ebsnvme-id.exe output: %q", string(output))
}
return matches[1], nil
}

This comment has been minimized.

Copy link
@gnufied

gnufied Jul 23, 2019

Member

Do we need some tests for this code?

This comment has been minimized.

Copy link
@wongma7

wongma7 Jul 23, 2019

Author Contributor

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))

This comment has been minimized.

Copy link
@gnufied

gnufied Jul 23, 2019

Member

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: ....

?

This comment has been minimized.

Copy link
@wongma7

wongma7 Jul 23, 2019

Author Contributor

yeah

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch from c397e1d to 00d31da Jul 23, 2019

@k8s-ci-robot k8s-ci-robot removed the lgtm label Jul 23, 2019

@wongma7 wongma7 force-pushed the wongma7:windows-ebs branch from 00d31da to 02530b9 Jul 23, 2019

@gnufied

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Jul 23, 2019

@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jul 23, 2019

/retest

@wongma7

This comment has been minimized.

Copy link
Contributor Author

commented Jul 23, 2019

@gnufied require your /approve as well pls . Thanks. 👍

@gnufied

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2019

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 60c2d44 into kubernetes:master Jul 24, 2019

17 of 23 checks passed

pull-kubernetes-e2e-gce Job triggered.
Details
pull-kubernetes-e2e-gce-100-performance Job triggered.
Details
pull-kubernetes-integration Job triggered.
Details
pull-kubernetes-kubemark-e2e-gce-big Job triggered.
Details
pull-kubernetes-node-e2e Job triggered.
Details
pull-kubernetes-verify Job triggered.
Details
cla/linuxfoundation wongma7 authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Job succeeded.
Details
pull-kubernetes-godeps Skipped.
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details

SIG-Windows automation moved this from In Progress+Review to Done (v1.16) Jul 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.