You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Neil Conway <ne...@gmail.com> on 2016/03/21 19:43:32 UTC

Review Request 45121: Implemented deletion for persistent volumes.

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

Review request for mesos, Jie Yu and Joris Van Remoortere.


Repository: mesos


Description
-------

Prior to this commit, destroying a persistent volume would remove
the Mesos-level metadata about the volume, but wouldn't destroy
any of the volume's filesystem content. We now remove the volume
from the slave's filesystem, essentially via "rm -r".


Diffs
-----

  src/slave/slave.cpp 840534ff0687e82ed063c386e36bbabada230697 

Diff: https://reviews.apache.org/r/45121/diff/


Testing
-------

make check


Thanks,

Neil Conway


Re: Review Request 45121: Implemented deletion for persistent volumes.

Posted by Jie Yu <yu...@gmail.com>.

> On March 26, 2016, 12:37 a.m., Jie Yu wrote:
> > src/slave/slave.cpp, line 2375
> > <https://reviews.apache.org/r/45121/diff/1/?file=1308847#file1308847line2375>
> >
> >     I would suggest we don't use CHECK here. We can just LOG(ERROR) if the deletion fails. Given the TODO above, we could leak disk space anyway.
> 
> Neil Conway wrote:
>     I used `CHECK_SOME` because we use the same error-handling strategy when creating the persistent volume fails, or if the slave fails to checkpoint resources to disk successfully. Are you sure we want to handle `rmdir` errors differently?

We cannot proceed when creating persistent volume fails because the subsequent 'mount' will fail.

For the deletion case, if it fails, we just leak some data in the volume. The subsequent operation will not fail. Since we'll be leaking data anyway (the slave crash case), I suggest that we don't use CHECK_SOME here.


- Jie


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


On March 27, 2016, 6:08 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45121/
> -----------------------------------------------------------
> 
> (Updated March 27, 2016, 6:08 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2408
>     https://issues.apache.org/jira/browse/MESOS-2408
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this commit, destroying a persistent volume would remove
> the Mesos-level metadata about the volume, but wouldn't destroy
> any of the volume's filesystem content. We now remove the volume
> from the slave's filesystem, essentially via "rm -r".
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp f383605a52f31d7b805ad6153adc409dcb40f83a 
> 
> Diff: https://reviews.apache.org/r/45121/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


Re: Review Request 45121: Implemented deletion for persistent volumes.

Posted by Neil Conway <ne...@gmail.com>.

> On March 26, 2016, 12:37 a.m., Jie Yu wrote:
> > src/slave/slave.cpp, line 2375
> > <https://reviews.apache.org/r/45121/diff/1/?file=1308847#file1308847line2375>
> >
> >     I would suggest we don't use CHECK here. We can just LOG(ERROR) if the deletion fails. Given the TODO above, we could leak disk space anyway.

I used `CHECK_SOME` because we use the same error-handling strategy when creating the persistent volume fails, or if the slave fails to checkpoint resources to disk successfully. Are you sure we want to handle `rmdir` errors differently?


- Neil


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


On March 21, 2016, 6:44 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45121/
> -----------------------------------------------------------
> 
> (Updated March 21, 2016, 6:44 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2408
>     https://issues.apache.org/jira/browse/MESOS-2408
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this commit, destroying a persistent volume would remove
> the Mesos-level metadata about the volume, but wouldn't destroy
> any of the volume's filesystem content. We now remove the volume
> from the slave's filesystem, essentially via "rm -r".
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 840534ff0687e82ed063c386e36bbabada230697 
> 
> Diff: https://reviews.apache.org/r/45121/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


Re: Review Request 45121: Implemented deletion for persistent volumes.

Posted by Jie Yu <yu...@gmail.com>.

> On March 26, 2016, 12:37 a.m., Jie Yu wrote:
> > src/slave/slave.cpp, line 2375
> > <https://reviews.apache.org/r/45121/diff/1/?file=1308847#file1308847line2375>
> >
> >     I would suggest we don't use CHECK here. We can just LOG(ERROR) if the deletion fails. Given the TODO above, we could leak disk space anyway.
> 
> Neil Conway wrote:
>     I used `CHECK_SOME` because we use the same error-handling strategy when creating the persistent volume fails, or if the slave fails to checkpoint resources to disk successfully. Are you sure we want to handle `rmdir` errors differently?
> 
> Jie Yu wrote:
>     We cannot proceed when creating persistent volume fails because the subsequent 'mount' will fail.
>     
>     For the deletion case, if it fails, we just leak some data in the volume. The subsequent operation will not fail. Since we'll be leaking data anyway (the slave crash case), I suggest that we don't use CHECK_SOME here.
> 
> Neil Conway wrote:
>     True, although for MOUNT disks we might expose data from the previous volume to a newly-created volume on the same disk. Overall I agree that using `LOG(ERROR)` is probably best for now.

For MOUNT, I think we have the same problem if slave crashes. We might want to do a clean during creation as well.


- Jie


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


On March 27, 2016, 6:08 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45121/
> -----------------------------------------------------------
> 
> (Updated March 27, 2016, 6:08 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2408
>     https://issues.apache.org/jira/browse/MESOS-2408
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this commit, destroying a persistent volume would remove
> the Mesos-level metadata about the volume, but wouldn't destroy
> any of the volume's filesystem content. We now remove the volume
> from the slave's filesystem, essentially via "rm -r".
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp f383605a52f31d7b805ad6153adc409dcb40f83a 
> 
> Diff: https://reviews.apache.org/r/45121/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


Re: Review Request 45121: Implemented deletion for persistent volumes.

Posted by Neil Conway <ne...@gmail.com>.

> On March 26, 2016, 12:37 a.m., Jie Yu wrote:
> > src/slave/slave.cpp, line 2375
> > <https://reviews.apache.org/r/45121/diff/1/?file=1308847#file1308847line2375>
> >
> >     I would suggest we don't use CHECK here. We can just LOG(ERROR) if the deletion fails. Given the TODO above, we could leak disk space anyway.
> 
> Neil Conway wrote:
>     I used `CHECK_SOME` because we use the same error-handling strategy when creating the persistent volume fails, or if the slave fails to checkpoint resources to disk successfully. Are you sure we want to handle `rmdir` errors differently?
> 
> Jie Yu wrote:
>     We cannot proceed when creating persistent volume fails because the subsequent 'mount' will fail.
>     
>     For the deletion case, if it fails, we just leak some data in the volume. The subsequent operation will not fail. Since we'll be leaking data anyway (the slave crash case), I suggest that we don't use CHECK_SOME here.

True, although for MOUNT disks we might expose data from the previous volume to a newly-created volume on the same disk. Overall I agree that using `LOG(ERROR)` is probably best for now.


- Neil


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


On March 27, 2016, 6:08 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45121/
> -----------------------------------------------------------
> 
> (Updated March 27, 2016, 6:08 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2408
>     https://issues.apache.org/jira/browse/MESOS-2408
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this commit, destroying a persistent volume would remove
> the Mesos-level metadata about the volume, but wouldn't destroy
> any of the volume's filesystem content. We now remove the volume
> from the slave's filesystem, essentially via "rm -r".
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp f383605a52f31d7b805ad6153adc409dcb40f83a 
> 
> Diff: https://reviews.apache.org/r/45121/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


Re: Review Request 45121: Implemented deletion for persistent volumes.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45121/#review125492
-----------------------------------------------------------


Fix it, then Ship it!





src/slave/slave.cpp (line 2333)
<https://reviews.apache.org/r/45121/#comment188289>

    insert a space before 'at'



src/slave/slave.cpp (lines 2344 - 2347)
<https://reviews.apache.org/r/45121/#comment188292>

    This is not a problem for PATH type disk. But it's definitely a problem for MOUNT type disk since it'll be offered to the framework, and the framework might create a new volume on top of that. We might want to do a cleanup when we create a volume from MOUNT type disk. Can you make sure the TODO captures that as well?



src/slave/slave.cpp (line 2373)
<https://reviews.apache.org/r/45121/#comment188293>

    I would suggest we don't use CHECK here. We can just LOG(ERROR) if the deletion fails. Given the TODO above, we could leak disk space anyway.


- Jie Yu


On March 21, 2016, 6:44 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45121/
> -----------------------------------------------------------
> 
> (Updated March 21, 2016, 6:44 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2408
>     https://issues.apache.org/jira/browse/MESOS-2408
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this commit, destroying a persistent volume would remove
> the Mesos-level metadata about the volume, but wouldn't destroy
> any of the volume's filesystem content. We now remove the volume
> from the slave's filesystem, essentially via "rm -r".
> 
> 
> Diffs
> -----
> 
>   src/slave/slave.cpp 840534ff0687e82ed063c386e36bbabada230697 
> 
> Diff: https://reviews.apache.org/r/45121/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


Re: Review Request 45121: Implemented deletion for persistent volumes.

Posted by Neil Conway <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45121/
-----------------------------------------------------------

(Updated March 27, 2016, 6:08 p.m.)


Review request for mesos, Jie Yu and Joris Van Remoortere.


Changes
-------

Address review comments.


Bugs: MESOS-2408
    https://issues.apache.org/jira/browse/MESOS-2408


Repository: mesos


Description
-------

Prior to this commit, destroying a persistent volume would remove
the Mesos-level metadata about the volume, but wouldn't destroy
any of the volume's filesystem content. We now remove the volume
from the slave's filesystem, essentially via "rm -r".


Diffs (updated)
-----

  src/slave/slave.cpp f383605a52f31d7b805ad6153adc409dcb40f83a 

Diff: https://reviews.apache.org/r/45121/diff/


Testing
-------

make check


Thanks,

Neil Conway


Re: Review Request 45121: Implemented deletion for persistent volumes.

Posted by Neil Conway <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45121/
-----------------------------------------------------------

(Updated March 21, 2016, 6:44 p.m.)


Review request for mesos, Jie Yu and Joris Van Remoortere.


Bugs: MESOS-2408
    https://issues.apache.org/jira/browse/MESOS-2408


Repository: mesos


Description
-------

Prior to this commit, destroying a persistent volume would remove
the Mesos-level metadata about the volume, but wouldn't destroy
any of the volume's filesystem content. We now remove the volume
from the slave's filesystem, essentially via "rm -r".


Diffs
-----

  src/slave/slave.cpp 840534ff0687e82ed063c386e36bbabada230697 

Diff: https://reviews.apache.org/r/45121/diff/


Testing
-------

make check


Thanks,

Neil Conway