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: unmount volume issue on Windows node #2691

Merged

Conversation

andyzhangx
Copy link
Member

What type of PR is this?
/kind bug

What this PR does / why we need it:
fix: unmount volume issue on Windows node, original behavior is just deleting the mounted directory which may lead to mount failure in frequent unmount and mount the same volume on the same node

I1204 14:39:28.920234    1336 utils.go:105] GRPC call: /csi.v1.Node/NodeUnpublishVolume
I1204 14:39:28.920234    1336 utils.go:106] GRPC request: {"target_path":"c:\\var\\lib\\kubelet\\pods\\d17b945a-2f91-4bfc-b5c9-28e886c86525\\volumes\\kubernetes.io~csi\\pvc-6afee86b-e9b9-4e63-a8a0-d49b887fd682\\mount","volume_id":"/subscriptions/b9d2281e-dcd5-4dfd-9a97-0d50377cdf76/resourceGroups/MC_andy-aks129_andy-aks129_eastus2/providers/Microsoft.Compute/disks/pvc-6afee86b-e9b9-4e63-a8a0-d49b887fd682"}
I1204 14:39:28.920916    1336 nodeserver.go:300] NodeUnpublishVolume: unmounting volume /subscriptions/b9d2281e-dcd5-4dfd-9a97-0d50377cdf76/resourceGroups/MC_andy-aks129_andy-aks129_eastus2/providers/Microsoft.Compute/disks/pvc-6afee86b-e9b9-4e63-a8a0-d49b887fd682 on c:\var\lib\kubelet\pods\d17b945a-2f91-4bfc-b5c9-28e886c86525\volumes\kubernetes.io~csi\pvc-6afee86b-e9b9-4e63-a8a0-d49b887fd682\mount
I1204 14:39:28.920916    1336 nodeserver.go:310] NodeUnpublishVolume: unmount volume /subscriptions/b9d2281e-dcd5-4dfd-9a97-0d50377cdf76/resourceGroups/MC_andy-aks129_andy-aks129_eastus2/providers/Microsoft.Compute/disks/pvc-6afee86b-e9b9-4e63-a8a0-d49b887fd682 on c:\var\lib\kubelet\pods\d17b945a-2f91-4bfc-b5c9-28e886c86525\volumes\kubernetes.io~csi\pvc-6afee86b-e9b9-4e63-a8a0-d49b887fd682\mount successfully
I1204 14:39:28.920916    1336 utils.go:112] GRPC response: {}
I1204 14:39:29.034346    1336 utils.go:105] GRPC call: /csi.v1.Node/NodeUnstageVolume
I1204 14:39:29.034346    1336 utils.go:106] GRPC request: {"staging_target_path":"\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\disk.csi.azure.com\\fef91c0445c24e34b58d31008ed7020a6502e7017b09a1b5b7012d4e3d28a1f6\\globalmount","volume_id":"/subscriptions/b9d2281e-dcd5-4dfd-9a97-0d50377cdf76/resourceGroups/MC_andy-aks129_andy-aks129_eastus2/providers/Microsoft.Compute/disks/pvc-6afee86b-e9b9-4e63-a8a0-d49b887fd682"}
I1204 14:39:29.034346    1336 nodeserver.go:201] NodeUnstageVolume: unmounting \var\lib\kubelet\plugins\kubernetes.io\csi\disk.csi.azure.com\fef91c0445c24e34b58d31008ed7020a6502e7017b09a1b5b7012d4e3d28a1f6\globalmount
I1204 14:39:29.035850    1336 safe_mounter_host_process_windows.go:69] Unmounting volume \\?\Volume{6a72717b-3413-4f50-a487-f46516fdb617}\ from \var\lib\kubelet\plugins\kubernetes.io\csi\disk.csi.azure.com\fef91c0445c24e34b58d31008ed7020a6502e7017b09a1b5b7012d4e3d28a1f6\globalmount
I1204 14:39:31.313932    1336 nodeserver.go:205] NodeUnstageVolume: unmount \var\lib\kubelet\plugins\kubernetes.io\csi\disk.csi.azure.com\fef91c0445c24e34b58d31008ed7020a6502e7017b09a1b5b7012d4e3d28a1f6\globalmount successfully
I1204 14:39:31.314177    1336 utils.go:112] GRPC response: {}

Which issue(s) this PR fixes:

Fixes #2690

Requirements:

Special notes for your reviewer:

Release note:

fix: unmount volume issue on Windows node

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 4, 2024
@k8s-ci-robot k8s-ci-robot requested a review from cvvz December 4, 2024 14:42
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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 added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 4, 2024
@andyzhangx andyzhangx force-pushed the fix-win-unmount-volume branch from 4db801a to b856814 Compare December 4, 2024 14:59
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 4, 2024
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx merged commit cee01c9 into kubernetes-sigs:master Dec 5, 2024
22 of 23 checks passed
@andyzhangx
Copy link
Member Author

/cherrypick release-1.31

@andyzhangx
Copy link
Member Author

/cherrypick release-1.30

@andyzhangx
Copy link
Member Author

/cherrypick release-1.29

@k8s-infra-cherrypick-robot

@andyzhangx: #2691 failed to apply on top of branch "release-1.29":

Applying: fix: unmount volume issue on Windows node
Using index info to reconstruct a base tree...
M	pkg/azuredisk/azure_common_windows.go
M	pkg/azuredisk/nodeserver.go
M	pkg/azuredisk/nodeserver_test.go
M	pkg/mounter/safe_mounter_host_process_windows.go
M	pkg/os/volume/volume.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/os/volume/volume.go
Auto-merging pkg/mounter/safe_mounter_host_process_windows.go
Auto-merging pkg/azuredisk/nodeserver_test.go
CONFLICT (content): Merge conflict in pkg/azuredisk/nodeserver_test.go
Auto-merging pkg/azuredisk/nodeserver.go
Auto-merging pkg/azuredisk/azure_common_windows.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix: unmount volume issue on Windows node

In response to this:

/cherrypick release-1.29

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@andyzhangx: #2691 failed to apply on top of branch "release-1.30":

Applying: fix: unmount volume issue on Windows node
Using index info to reconstruct a base tree...
M	pkg/azuredisk/azure_common_windows.go
M	pkg/azuredisk/nodeserver.go
M	pkg/azuredisk/nodeserver_test.go
M	pkg/mounter/safe_mounter_host_process_windows.go
M	pkg/os/volume/volume.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/os/volume/volume.go
Auto-merging pkg/mounter/safe_mounter_host_process_windows.go
Auto-merging pkg/azuredisk/nodeserver_test.go
CONFLICT (content): Merge conflict in pkg/azuredisk/nodeserver_test.go
Auto-merging pkg/azuredisk/nodeserver.go
Auto-merging pkg/azuredisk/azure_common_windows.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix: unmount volume issue on Windows node

In response to this:

/cherrypick release-1.30

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@andyzhangx: new pull request created: #2693

In response to this:

/cherrypick release-1.31

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azuredisk-node-win fails to mount disk: requested access path is already in use
3 participants