Should "atomic storage reset" check for immutable flags?
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?
Is there a find command to look for immutable files?
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.
@rhvgoyal WDYT?
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.