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

Disable mount propagation for windows containers #60275

Merged
merged 1 commit into from Feb 24, 2018

Conversation

@feiskyer
Member

feiskyer commented Feb 23, 2018

What this PR does / why we need it:

Windows containers don't support mount propagation. This PR disables it for windows containers.

Without this PR, windows containers creation would fail with error:

Error: Error response from daemon: invalid bind mount spec "c:\var\lib\kubelet\pods\a260a7c4-1852-11e8-bb1d-000d3a19c1da\volumes\kubernetes.iosecret\default-token-rj7qv:c:/var/run/secrets/kubernetes.io/serviceaccount:ro,rslave": invalid volume specification: 'c:\var\lib\kubelet\pods\a260a7c4-1852-11e8-bb1d-000d3a19c1da\volumes\kubernetes.iosecret\default-token-rj7qv:c:\var\run\secrets\kubernetes.io\serviceaccount:ro,rslave'

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #60274

Special notes for your reviewer:

Release note:

Disable mount propagation for windows containers.
@feiskyer

This comment has been minimized.

Member

feiskyer commented Feb 23, 2018

/sig windows

@feiskyer feiskyer added this to the v1.10 milestone Feb 23, 2018

@feiskyer

This comment has been minimized.

Member

feiskyer commented Feb 23, 2018

/sig node

@michmike

This comment has been minimized.

michmike commented Feb 23, 2018

I approved this PR , but please also modify the documentation at https://kubernetes.io/docs/getting-started-guides/windows/ to add this at the bottom under known limitations

@michmike

This comment has been minimized.

michmike commented Feb 23, 2018

/lgtm

@@ -272,6 +272,12 @@ func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, h
// translateMountPropagation transforms v1.MountPropagationMode to
// runtimeapi.MountPropagation.
func translateMountPropagation(mountMode *v1.MountPropagationMode) (runtimeapi.MountPropagation, error) {
if runtime.GOOS == "windows" {

This comment has been minimized.

@dchen1107

dchen1107 Feb 24, 2018

Member

I am expecting we have more like this coming. Can you add a TODO to make this kind of Windows specific configuration / tuning can be easily managed? I don't want things like this scattered everywhere in our codebase, but can live with it for now with a TODO to unblock our progress.

This comment has been minimized.

@dchen1107

dchen1107 Feb 24, 2018

Member

Ok, I filed #60338 as a record, so that we can process your pr asap.

This comment has been minimized.

@feiskyer

feiskyer Feb 24, 2018

Member

Thanks

@dchen1107

This comment has been minimized.

Member

dchen1107 commented Feb 24, 2018

/lgtm

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Feb 24, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, feiskyer, michmike

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-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Feb 24, 2018

Automatic merge from submit-queue (batch tested with PRs 60054, 60202, 60219, 58090, 60275). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit af58729 into kubernetes:master Feb 24, 2018

13 checks passed

Submit Queue Queued to run github e2e tests a second time.
Details
cla/linuxfoundation feiskyer authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-unit Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

@feiskyer feiskyer deleted the feiskyer:mount branch Feb 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment