We observed an exit/crash loop on an agent originating from deleting a persistent volume:
This persistent volume happened to have one (or more) files within marked as immutable.
When the agent went to delete this persistent volume, via os::rmdir(...), it encountered these immutable file(s) and exits like:
The agent would then be unable to start up again, because during recovery, the agent would attempt to delete the same persistent volume and fail to do so.
Manually removing the immutable attribute from files within the persistent volume allows the agent to recover:
Immutable attributes can be easily introduced by any tasks running on the agent. As long as the task has sufficient permissions, it could easily call chattr +i .... This attribute could also affect sandbox GC, which also uses os::rmdir to clean up. However, sandbox GC tends to warn rather than exit on failure.