tenortim / k8s_isi_provisioner

Kubernetes external storage provisioner for Dell Isilon
Apache License 2.0
9 stars 5 forks source link

Deletion of PVC #3

Open bravomail opened 5 years ago

bravomail commented 5 years ago

When I try to delete PVC, it complains that folder is not empty, and it is indeed not empty. The problem is - folder content is owned by different userID, something like 1000710000

ls -alh total 128 drwxrwxrwx 4 openshift_test IsilonGroup 59B Oct 14 12:53 . drwxrwxr-x + 12 openshift_test 987 718B Oct 14 13:33 .. drwxr-x--- 2 1000710000 wheel 2.3K Oct 8 12:22 mysql drwxr-x--- 2 1000710000 wheel 1.0K Oct 8 12:23 performance_schema

So I cannot delete these objects even manually. Pod just keeps trying to remove those objects in a loop and fails each time:

E1014 18:33:28.051817 1 controller.go:1212] delete "pvc-d6bc6da8-e9dc-11e9-ae52-0050568cda45": volume deletion failed: failed to delete volume directory mysql-storage-pvc-d6bc6da8-e9dc-11e9-ae52-0050568cda45: The directory 'usdet2satic/nfs/Openshift_104197/data001/mysql-storage-pvc-d6bc6da8-e9dc-11e9-ae52-0050568cda45' is not empty. W1014 18:33:28.051923 1 controller.go:796] Retrying syncing volume "pvc-d6bc6da8-e9dc-11e9-ae52-0050568cda45" because failures 1 < threshold 15 E1014 18:33:28.051978 1 controller.go:811] error syncing volume "pvc-d6bc6da8-e9dc-11e9-ae52-0050568cda45": failed to delete volume directory mysql-storage-pvc-d6bc6da8-e9dc-11e9-ae52-0050568cda45: The directory 'usdet2satic/nfs/Openshift_104197/data001/mysql-storage-pvc-d6bc6da8-e9dc-11e9-ae52-0050568cda45' is not empty.

bravomail commented 5 years ago

Pls disregard. I since learned that Openshift container using any NAS should run with particular user ID and group ID. https://docs.openshift.com/container-platform/3.11/install_config/persistent_storage/pod_security_context.html https://docs.openshift.com/container-platform/3.11/install_config/persistent_storage/persistent_storage_nfs.html https://docs.openshift.com/container-platform/3.11/install_config/storage_examples/shared_storage.html#sharing-an-nfs-pv-across-two-pods-creating-an-additional-pod-to-reference-the-same-pvc I can now delete PVCs and PVs.