Open bravomail opened 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.
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
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.