Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Currently, when a persistent volume is DESTROYed, we ensure that `rmdir` of that directory is successful before returning that disk as an offereable resource. So, when a CREATE is received for the same path, we thereby ensure that the contents of that path is empty (MOUNT disks will have the root present though). This ensures that frameworks of the same role do not leak content to other frameworks. Reference: MESOS-5448.
However, an agent might join a cluster who do not have the path corresponding to the disks clean. One of the scenarios might be if the agents join a new cluster after being repurposed from another cluster without their disks being formatted. In such a case, the CREATE of a persistent volume on an existing path might contain data left over from a previous run in the old cluster which might lead to inconsistencies esp if the tasks running in the container always expect to receive a clean persistent volume.