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

fix smb remount issue on Windows #73661

Merged
merged 1 commit into from Feb 15, 2019

Conversation

@andyzhangx
Copy link
Member

andyzhangx commented Feb 2, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
fix smb remount issue on Windows by:

if smb mount failed:
   if the original smb mount exists:
      remove original smb mount
      mount again

Without this PR, smb remount on same windows node would fail since original mount already exists

Which issue(s) this PR fixes:

Fixes #73087

Special notes for your reviewer:

  • move part of the code from mounter.Mount func and add following code to check whether remotepath has already been mapped
		cmd := exec.Command("powershell", "/c", `Get-SmbGlobalMapping -RemotePath $Env:smbremotepath`)
		cmd.Env = append(os.Environ(), fmt.Sprintf("smbremotepath=%s", remotepath))
		output, err = cmd.CombinedOutput()

Does this PR introduce a user-facing change?:

NONE

Release note:

fix smb remount issue on Windows

/sig windows

/assign @msau42 @jsafrane
cc @jingxu97

@andyzhangx

This comment has been minimized.

Copy link
Member Author

andyzhangx commented Feb 2, 2019

/pull-kubernetes-cross
/priority important-soon

@PatrickLang

This comment has been minimized.

Copy link
Contributor

PatrickLang commented Feb 5, 2019

/milestone v1.14

@k8s-ci-robot k8s-ci-robot added this to the v1.14 milestone Feb 5, 2019

@PatrickLang PatrickLang moved this from Backlog to In Review in SIG-Windows Feb 5, 2019

Show resolved Hide resolved pkg/util/mount/mount_windows.go Outdated
fix smb remount issue on Windows
add comments for doSMBMount func

fix comments about smb mount

@andyzhangx andyzhangx force-pushed the andyzhangx:smb-mount-windows branch from 10f268c to 660813c Feb 14, 2019

@k8s-ci-robot k8s-ci-robot added the size/L label Feb 14, 2019

@andyzhangx

This comment has been minimized.

Copy link
Member Author

andyzhangx commented Feb 14, 2019

/pull-kubernetes-cross

@andyzhangx

This comment has been minimized.

Copy link
Member Author

andyzhangx commented Feb 14, 2019

@PatrickLang I have changed the PR according to your comments, test with delete pod of k8s deployment on windows shows good

@msau42

This comment has been minimized.

Copy link
Member

msau42 commented Feb 15, 2019

/assign @jingxu97
to help take a look

@PatrickLang

This comment has been minimized.

Copy link
Contributor

PatrickLang commented Feb 15, 2019

/LGTM
thanks!

@jsafrane

This comment has been minimized.

Copy link
Member

jsafrane commented Feb 15, 2019

/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 15, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, jsafrane

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 9027738 into kubernetes:master Feb 15, 2019

17 checks passed

cla/linuxfoundation andyzhangx 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-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-godeps Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped
tide In merge pool.
Details

SIG-Windows automation moved this from In Review to Done (v.1.14) Feb 15, 2019

k8s-ci-robot added a commit that referenced this pull request Feb 20, 2019

Merge pull request #74184 from andyzhangx/automated-cherry-pick-of-#7…
…3661-upstream-release-1.12

Automated cherry pick of #73661

k8s-ci-robot added a commit that referenced this pull request Feb 23, 2019

Merge pull request #74185 from andyzhangx/automated-cherry-pick-of-#7…
…3661-upstream-release-1.11

Automated cherry pick of #73661

k8s-ci-robot added a commit that referenced this pull request Feb 23, 2019

Merge pull request #74183 from andyzhangx/automated-cherry-pick-of-#7…
…3661-upstream-release-1.13

Automated cherry pick of #73661
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.