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

file access issue with smb-provisioner on Windows #79

Closed
andyzhangx opened this issue Aug 11, 2020 · 6 comments
Closed

file access issue with smb-provisioner on Windows #79

andyzhangx opened this issue Aug 11, 2020 · 6 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@andyzhangx
Copy link
Member

What happened:
When mount multiple pods with smb-provisioner on Windows, there would be error like following:

The process cannot access the file because it is being used by another process.

could be related to dperson/samba setting, related issue: dperson/samba#330

https://github.com/kubernetes-csi/csi-driver-smb/blob/master/deploy/example/smb-provisioner/smb-server.yaml

Events:
  Type     Reason     Age               From                 Message
  ----     ------     ----              ----                 -------
  Normal   Scheduled  13s               default-scheduler    Successfully assigned default/busybox-smb-6dc9949fdf-tfnzp to 3460k8s000
  Normal   Pulled     8s (x2 over 10s)  kubelet, 3460k8s000  Container image "e2eteam/busybox:1.29" already present on machine
  Normal   Created    8s (x2 over 10s)  kubelet, 3460k8s000  Created container busybox
  Warning  Failed     8s (x2 over 10s)  kubelet, 3460k8s000  Error: failed to start container "busybox": Error response from daemon: hcsshim::CreateComputeSystem busybox: The process cannot access the file because it is being used by another process.
(extra info: {"SystemType":"Container","Name":"busybox","Owner":"docker","VolumePath":"\\\\?\\Volume{de73c5cb-eb16-4bbd-8690-d296f9fb5f93}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\busybox","Layers":[{"ID":"c004932e-c6ff-5599-9dd8-ef0a516f1ff3","Path":"C:\\ProgramData\\docker\\windowsfilter\\89fc1203de17533dc6ff14692c29bd8263ce2e97a748a9436464e84b4c363f29"},{"ID":"48b7e8b9-ed95-5184-9482-efb548c09374","Path":"C:\\ProgramData\\docker\\windowsfilter\\472e5b320a3654e53f229fcf8750b069a4630463aa55ab7dfdaa49c0a38d8897"},{"ID":"e4df7ab2-d104-5533-87ce-4e3d0d28b7b3","Path":"C:\\ProgramData\\docker\\windowsfilter\\b1026ded499d8d5625545af4c3b4272ca0eef7cefb130a26f045c76a5221fc5b"},{"ID":"0600eb5f-c455-5b88-8982-a94f9f031909","Path":"C:\\ProgramData\\docker\\windowsfilter\\9d776dabf4b393c6e8de3e26cb9f6d874a982302faf6889612ad47d457041ef7"},{"ID":"00f720e2-032e-55d9-9773-7f17e646d730","Path":"C:\\ProgramData\\docker\\windowsfilter\\85f034500ec6f26ab68661c8f64de69fa09f2107a26370c611ef51fcf6526a01"},{"ID":"4b68d70f-1bf3-521e-a6af-79bc89c863b0","Path":"C:\\ProgramData\\docker\\windowsfilter\\345b971231babda13f4615cef234ced8dd3f1cd8496f170def51a02ac456b6cd"},{"ID":"2f65e0e9-6237-5709-9017-117ffa5b08c1","Path":"C:\\ProgramData\\docker\\windowsfilter\\0378b1a51532f2d431f943edc9378fa78d290a33eb4044b16040cd67b4e777c5"},{"ID":"d9747d99-2bbf-53d0-b77a-307f7c3454ec","Path":"C:\\ProgramData\\docker\\windowsfilter\\f9e683c3ae54f0d6422ad60facadd343090c6abd522927a69b45e712ecb974be"},{"ID":"700c56b2-85b0-5ce8-978d-f18c5d498085","Path":"C:\\ProgramData\\docker\\windowsfilter\\b69124eb460d41297faa690ed36fc1442bc0c8d99c80f0dde9739b0944fa2c10"},{"ID":"576dd396-6937-5f19-9328-337cf5024d27","Path":"C:\\ProgramData\\docker\\windowsfilter\\94da01276906be01c57e374fa8b357f126785d9f25c9ee2e5c55137f3d4743e3"},{"ID":"67d7feed-a5f1-5e6d-b712-fa1316239201","Path":"C:\\ProgramData\\docker\\windowsfilter\\e5d5b06820145e28a845d134f9b5cb6ab2a24ea3fdd719df1954d68b6a42bef5"},{"ID":"8014b4cb-ad5a-5ca8-9cc0-16a4c72300e5","Path":"C:\\ProgramData\\docker\\windowsfilter\\bf5a61c3b82581c95eafa4b4bd4993058671fd697964a32938fe505536786493"}],"HostName":"busybox-smb-6dc9949fdf-tfnzp","MappedDirectories":[{"HostPath":"c:\\var\\lib\\kubelet\\pods\\bd7b8709-f876-44e6-bb21-35694fe7f9d7\\volumes\\kubernetes.io~csi\\pvc-5b6019d0-74fc-4646-9943-138975006f8b\\mount","ContainerPath":"c:\\mnt\\smb","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"HostPath":"c:\\var\\lib\\kubelet\\pods\\bd7b8709-f876-44e6-bb21-35694fe7f9d7\\volumes\\kubernetes.io~secret\\default-token-6mxbl","ContainerPath":"c:\\var\\run\\secrets\\kubernetes.io\\serviceaccount","ReadOnly":true,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false}],"HvPartition":false,"NetworkSharedContainerName":"fa04cbb476914eca9864e8bcaa53d57d2f2c36d1788f57e7e0150a4e3cc1f857"})
  Warning  BackOff  7s  kubelet, 3460k8s000  Back-off restarting failed container


azureuser@3460k8s000 c:\var\lib\kubelet\plugins\kubernetes.io\csi\pv\pvc-5b6019d0-74fc-4646-9943-138975006f8b>dir
 Volume in drive C is Windows
 Volume Serial Number is F01C-4478

 Directory of c:\var\lib\kubelet\plugins\kubernetes.io\csi\pv\pvc-5b6019d0-74fc-4646-9943-138975006f8b

08/10/2020  02:42 PM    <DIR>          .
08/10/2020  02:42 PM    <DIR>          ..
08/10/2020  02:42 PM    <SYMLINKD>     globalmount [\\52.177.137.222\share]
08/10/2020  02:42 PM                90 vol_data.json
               1 File(s)             90 bytes
               3 Dir(s)  118,885,298,176 bytes free

azureuser@3460k8s000 c:\var\lib\kubelet\plugins\kubernetes.io\csi\pv\pvc-5b6019d0-74fc-4646-9943-138975006f8b>cd blobal

azureuser@3460k8s000 c:\var\lib\kubelet\plugins\kubernetes.io\csi\pv\pvc-5b6019d0-74fc-4646-9943-138975006f8b>cd globalmount
The process cannot access the file because it is being used by another process.

What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment:

  • CSI Driver version:
  • Kubernetes version (use kubectl version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@andyzhangx andyzhangx added kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Aug 11, 2020
@andyzhangx
Copy link
Member Author

@andyzhangx
Copy link
Member Author

I could confirm that the fix(andyzhangx/samba@26c899d) could really fix the permission issue on Windows. Still looking forward https://github.com/dperson/samba to make a fix in master branch.

Here is my fixed image: andyzhangx/samba:win-fix
My command to build docker image:

docker build --no-cache -t andyzhangx/samba:win-fix -f ./Dockerfile .

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 16, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 16, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants