atomic icon indicating copy to clipboard operation
atomic copied to clipboard

Should "atomic storage reset" check for immutable flags?

Open mbarnes opened this issue 8 years ago • 4 comments

Last week I rolled out overlay2 to an internal OpenShift cluster maintained by operations.

One technical bump I hit was operations places an immutable flag (chattr +i) on /var/lib/docker/volumes, which caused atomic storage reset to fail to recursively delete /var/lib/docker.

I was able to work around it, but just raising it here for your consideration.

Is this something atomic storage reset should handle? As in: note which directories are immutable, remove the flags before resetting storage, and then restore the flags after?

mbarnes avatar Oct 09 '17 12:10 mbarnes

Is there a find command to look for immutable files?

rhatdan avatar Oct 09 '17 13:10 rhatdan

Of course if an admin wants to make something immutable, then overriding it by default might not be the correct thing to do. We could point it out to the user, I guess.

rhatdan avatar Oct 09 '17 13:10 rhatdan

@rhvgoyal WDYT?

rhatdan avatar Oct 09 '17 13:10 rhatdan

Is there a find command to look for immutable files?

Not on Linux. (BSD find apparently has -xattrname)

Best solution I found so far is this answer on Stack Exchange. Could speed that up by limiting the search to directories.

mbarnes avatar Oct 09 '17 17:10 mbarnes