Origin: oc cluster down leaves secret mount points in volume directory

Created on 27 Feb 2017  路  3Comments  路  Source: openshift/origin

After running oc cluster down secret mount points remain mounted in the --host-volumes-dir

Version

oc v1.5.0-alpha.1+71d3fa9
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO

Steps To Reproduce
  1. oc cluster up --host-volumes-dir=/tmp/test-volumes
  2. _do something_
  3. oc cluster down
  4. rm -rf /tmp/test-volumes
Current Result

Cannot clear out the volumes directory, e.g.
rm: cannot remove '/tmp/test-volumes/pods/61cadc36-fab1-11e6-abd2-507b9dcf147a/volumes/kubernetes.io~secret/router-token-imy4z': Device or resource busy

Expected Result

oc cluster down to return to umount'd state

Additional Information

Little workaround line to umount (but make sure the grep works for you!)
for m in $(mount | grep pods | awk '{print $3}'); do umount $m ; done

componencluster-up kinbug prioritP2

Most helpful comment

I'd recommend findmnt -r -n -o TARGET |grep /var/lib/origin | xargs -r umount as it's less string parsing. (In general, I always use findmnt nowadays to display mounts)

All 3 comments

I'd recommend findmnt -r -n -o TARGET |grep /var/lib/origin | xargs -r umount as it's less string parsing. (In general, I always use findmnt nowadays to display mounts)

Those mounts are eventually removed by the kubelet when you start the cluster again, but yes agree that they could be removed.

Was this page helpful?
0 / 5 - 0 ratings