mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Conway <neil.con...@gmail.com>
Subject Re: Review Request 48315: Restart slave if a volume is CREATED on a non-empty path.
Date Mon, 13 Jun 2016 08:42:13 GMT


> On June 8, 2016, 1:06 p.m., Neil Conway wrote:
> > (1) This could benefit from a unit test.
> > 
> > (2) More importantly, what happens if the directory already exists and contains
data? By "cleanup", you mean delete any existing data in the directory, right? ISTM this could
very easily result in deleting user data, if I have an existing data set that I want to make
accessible to a Mesos task.
> 
> Anindya Sinha wrote:
>     For (2): No, we are not deleting contents of the directory when a CREATE specifies
a path that is present, and has data in it. If we happen to receive such a path in CREATE,
we do not update checkpointed resources in the agent and exit (similar to how we handle the
case when mkdir fails). So, a CREATE is processed and checkpoint is updated only if the directory
is missing (we do a mkdir in this case), or the contents of the directory is empty (which
can happen for MOUNT disks).
>     
>     Since we update checkpoint only on successful rmdir (in case of DESTROY), the CREATE
call path is entered only if that path is not present in the original checkpointed resources
(which means the rmdir of the original DESTROY) is successful.

Ah, ok. The result of this change is that it won't be possible to use a `MOUNT` disk to make
a pre-existing data set accessible to a Mesos task. Do you think that functionality is important
to preserve?

Note that if we do make this change, we should document it.


- Neil


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48315/#review136633
-----------------------------------------------------------


On June 9, 2016, 12:25 a.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48315/
> -----------------------------------------------------------
> 
> (Updated June 9, 2016, 12:25 a.m.)
> 
> 
> Review request for mesos, Neil Conway and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5448
>     https://issues.apache.org/jira/browse/MESOS-5448
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Root of a MOUNT disk is not deleted on volume DELETE. When we do a
> CREATE on a persistent volume and the root directory exists (which
> can happen for MOUNT disks), we allow the operation only if the
> contents within the root directory is empty. If not, we do not update
> the checkpoint with this volume and exit, so as to cleanup when the
> slave restarts and handles the CheckpointResourcesMessage.
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp d635dd2c6f6fce5a9eeefc5dcdf84e00cdc833b6 
> 
> Diff: https://reviews.apache.org/r/48315/diff/
> 
> 
> Testing
> -------
> 
> All tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message