[
https://issues.apache.org/jira/browse/MESOS-6818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15763184#comment-15763184
]
Anindya Sinha commented on MESOS-6818:
--------------------------------------
To handle this case, we can determine if disks are empty or not at agent
startup and looking at the contents of the checkpoint info at that time. If
there is a disk that contains old data, there are 2 approaches that can be done:
a) Do not allow the agent to register with the master. It would therefore
require an operator to clean/format the disk (or change the static resources
pertaining to these unclean disks.
b) Allow the agent to register with disks that have clean contents only. Say,
the --resources flag indicates 4 disks of which 1 of the disk is unclean (i.e.
old data exists), the agent advertises only 3 disks as available resources.
> Ensure empty contents in persistent volume if disk not in use.
> --------------------------------------------------------------
>
> Key: MESOS-6818
> URL: https://issues.apache.org/jira/browse/MESOS-6818
> Project: Mesos
> Issue Type: Improvement
> Components: general
> Reporter: Anindya Sinha
> Priority: Minor
> Labels: persistent-volumes
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)