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

minikube: cannot unmount volume managed by hostpath.csi.k8s.io #217

Closed
umegaya opened this issue Nov 10, 2020 · 7 comments
Closed

minikube: cannot unmount volume managed by hostpath.csi.k8s.io #217

umegaya opened this issue Nov 10, 2020 · 7 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@umegaya
Copy link

umegaya commented Nov 10, 2020

problem

  • cannot terminate pod after restart a few times, because of unmount failure like following, but directory correspond to volume id seems to exist

  • error log

Nov 09 07:35:14 minikube kubelet[3904]: E1109 07:35:14.838122    3904 nestedpendingoperations.go:301] Operation for "{volumeName:kubernetes.io/csi/hostpath.csi.k8s.io^8f1522d7-2258-11eb-93f9-0242ac110016 podName:edd9ef9a-76cb-4217-9230-acc770665872 nodeName:}" failed. No retries permitted until 2020-11-09 07:37:16.838100419 +0000 UTC m=+28108.053332682 (durationBeforeRetry 2m2s). Error: "UnmountVolume.TearDown failed for volume \"test-etc\" (UniqueName: \"kubernetes.io/csi/hostpath.csi.k8s.io^8f1522d7-2258-11eb-93f9-0242ac110016\") pod \"edd9ef9a-76cb-4217-9230-acc770665872\" (UID: \"edd9ef9a-76cb-4217-9230-acc770665872\") : kubernetes.io/csi: mounter.TearDownAt failed: rpc error: code = NotFound desc = volume id 8f1522d7-2258-11eb-93f9-0242ac110016 does not exist in the volumes list"
  • directory under /var/lib/csi-hostpath-data exists
$ ls -al /var/lib/csi-hostpath-data | grep 8f1522d7-2258-11eb-93f9-0242ac110016
drwxr-xr-x  2 docker docker     40 Nov  9 06:55 8f1522d7-2258-11eb-93f9-0242ac110016

$ ls -al /var/lib/csi-hostpath-data/8f1522d7-2258-11eb-93f9-0242ac110016/
total 0
drwxr-xr-x  2 docker docker   40 Nov  9 06:55 .
drwxr-xr-x 62 root   root   2320 Nov  9 06:55 ..
  • I think volume id 8f1522d7-2258-11eb-93f9-0242ac110016 points to the directory under /var/lib/csi-hostpath-data and error indidate the directory does not exist. but /var/lib/csi-hostpath-data/8f1522d7-2258-11eb-93f9-0242ac110016/ actually exists. any idea about why this error happen?

regards,

environment

  • minikube version
$ minikube version
minikube version: v1.14.2
commit: 2c82918e2347188e21c4e44c8056fc80408bce10
  • kubernetes
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T18:49:28Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:58Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
  • installation method of csi hostpath driver
 $ minikube addons enable volumesnapshots
 $ minikube addons enable csi-hostpath-driver
  • storage class (note that, it has correspond volume snapshot class)
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: test-sc
provisioner: hostpath.csi.k8s.io
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotClass
metadata:
  labels:
    velero.io/csi-volumesnapshot-class: test-sc
  name: test-vsc
driver: hostpath.csi.k8s.io
deletionPolicy: Retain
  • pvc
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: test-etc
  annotations:
    volume.beta.kubernetes.io/storage-class: test-sc
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: test-sc
  resources:
    requests:
      storage: 5Mi
@aayushrangwala
Copy link
Contributor

@umegaya What version of csi driver it is?
The list of volumes and their snapshots are actually stored in-memory in a map, which gets re-initiated once the plugin pod is restarted. Please refer this issue and check if this is the case.

@umegaya
Copy link
Author

umegaya commented Nov 10, 2020

@aayushrangwala hi, driver version seems to be 1.4.0 according to the kubectl cluster-info dump output
I1110 13:14:04.119223 1 connection.go:185] GRPC response: {"name":"hostpath.csi.k8s.io","vendor_version":"v1.4.0-rc2-0-gee6beeaf"}

and your link looks similar with my case, but if so, how can I prevent csi-hostpath-driver from losing its list of volume which is only stored in memory? because of the problem, I cannot terminate my pods normally, only force termination works.

@aayushrangwala
Copy link
Contributor

aayushrangwala commented Nov 13, 2020

@umegaya You cannot prevent them. Its re-discovering the snapshots only, not the volumes.

@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-contributor-experience at kubernetes/community.
/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 Feb 11, 2021
@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-contributor-experience at kubernetes/community.
/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 Mar 13, 2021
@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-contributor-experience at kubernetes/community.
/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-contributor-experience at kubernetes/community.
/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.

sunnylovestiramisu added a commit to sunnylovestiramisu/csi-driver-host-path that referenced this issue Apr 12, 2023
6613c39 Merge pull request kubernetes-csi#223 from sunnylovestiramisu/update
0e7ae99 Update k8s image repo url
77e47cc Merge pull request kubernetes-csi#222 from xinydev/fix-dep-version
155854b Fix dep version mismatch
8f83905 Merge pull request kubernetes-csi#221 from sunnylovestiramisu/go-update
1d3f94d Update go version to 1.20 to match k/k v1.27
e322ce5 Merge pull request kubernetes-csi#220 from andyzhangx/fix-golint-error
b74a512 test: fix golint error
aa61bfd Merge pull request kubernetes-csi#218 from xing-yang/update_csi_driver
7563d19 Update CSI_PROW_DRIVER_VERSION to v1.11.0
a2171be Merge pull request kubernetes-csi#216 from msau42/process
cb98782 Merge pull request kubernetes-csi#217 from msau42/owners
a11216e add new reviewers and remove inactive reviewers
dd98675 Add step for checking builds

git-subtree-dir: release-tools
git-subtree-split: 6613c39
sunnylovestiramisu added a commit to sunnylovestiramisu/csi-driver-host-path that referenced this issue Apr 13, 2023
6613c39 Merge pull request kubernetes-csi#223 from sunnylovestiramisu/update
0e7ae99 Update k8s image repo url
77e47cc Merge pull request kubernetes-csi#222 from xinydev/fix-dep-version
155854b Fix dep version mismatch
8f83905 Merge pull request kubernetes-csi#221 from sunnylovestiramisu/go-update
1d3f94d Update go version to 1.20 to match k/k v1.27
e322ce5 Merge pull request kubernetes-csi#220 from andyzhangx/fix-golint-error
b74a512 test: fix golint error
aa61bfd Merge pull request kubernetes-csi#218 from xing-yang/update_csi_driver
7563d19 Update CSI_PROW_DRIVER_VERSION to v1.11.0
a2171be Merge pull request kubernetes-csi#216 from msau42/process
cb98782 Merge pull request kubernetes-csi#217 from msau42/owners
a11216e add new reviewers and remove inactive reviewers
dd98675 Add step for checking builds

git-subtree-dir: release-tools
git-subtree-split: 6613c39
sunnylovestiramisu added a commit to sunnylovestiramisu/csi-driver-host-path that referenced this issue Apr 13, 2023
6613c39 Merge pull request kubernetes-csi#223 from sunnylovestiramisu/update
0e7ae99 Update k8s image repo url
77e47cc Merge pull request kubernetes-csi#222 from xinydev/fix-dep-version
155854b Fix dep version mismatch
8f83905 Merge pull request kubernetes-csi#221 from sunnylovestiramisu/go-update
1d3f94d Update go version to 1.20 to match k/k v1.27
e322ce5 Merge pull request kubernetes-csi#220 from andyzhangx/fix-golint-error
b74a512 test: fix golint error
aa61bfd Merge pull request kubernetes-csi#218 from xing-yang/update_csi_driver
7563d19 Update CSI_PROW_DRIVER_VERSION to v1.11.0
a2171be Merge pull request kubernetes-csi#216 from msau42/process
cb98782 Merge pull request kubernetes-csi#217 from msau42/owners
a11216e add new reviewers and remove inactive reviewers
dd98675 Add step for checking builds

git-subtree-dir: release-tools
git-subtree-split: 6613c39
TerryHowe pushed a commit to TerryHowe/csi-driver-host-path that referenced this issue Oct 17, 2024
add new reviewers and remove inactive reviewers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants