You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2015/03/05 21:15:16 UTC

Review Request 31772: Fixed a bug in PosixDiskIsolator during slave recovery.

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

Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.


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


Repository: mesos


Description
-------

Fixed a bug in PosixDiskIsolator during slave recovery. See ticket for details.

Currently, RunState.directory points to the metadata directory. This would cause the PosixDiskIsolator to report incorrect disk usages after slave recovery.

This patch kills 'directory' in RunState and calculate the 'directory' correctly in ExecutorRunState.


Diffs
-----

  src/slave/containerizer/mesos/containerizer.cpp ec4626f903d44c0911093ff763ef16ad27c418a9 
  src/slave/state.hpp 0201e727585a86957c3116ee2fb36db8a4816010 
  src/slave/state.cpp 41f6c2c4bb68cca9569b528eda4fbc74d0cf934f 
  src/tests/disk_quota_tests.cpp 56d82eeb715080da40926f3661dbb7e66aeb3932 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 31772: Fixed a bug in PosixDiskIsolator during slave recovery.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31772/#review75398
-----------------------------------------------------------

Ship it!


Ship It!

- Vinod Kone


On March 5, 2015, 9:51 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31772/
> -----------------------------------------------------------
> 
> (Updated March 5, 2015, 9:51 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Bugs: MESOS-2452
>     https://issues.apache.org/jira/browse/MESOS-2452
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed a bug in PosixDiskIsolator during slave recovery. See ticket for details.
> 
> Currently, RunState.directory points to the metadata directory. This would cause the PosixDiskIsolator to report incorrect disk usages after slave recovery.
> 
> This patch kills 'directory' in RunState and calculate the 'directory' correctly in ExecutorRunState.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp ec4626f903d44c0911093ff763ef16ad27c418a9 
>   src/slave/state.hpp 0201e727585a86957c3116ee2fb36db8a4816010 
>   src/slave/state.cpp 41f6c2c4bb68cca9569b528eda4fbc74d0cf934f 
>   src/tests/disk_quota_tests.cpp 56d82eeb715080da40926f3661dbb7e66aeb3932 
> 
> Diff: https://reviews.apache.org/r/31772/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31772: Fixed a bug in PosixDiskIsolator during slave recovery.

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

(Updated March 5, 2015, 9:51 p.m.)


Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.


Changes
-------

Review comments.


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


Repository: mesos


Description
-------

Fixed a bug in PosixDiskIsolator during slave recovery. See ticket for details.

Currently, RunState.directory points to the metadata directory. This would cause the PosixDiskIsolator to report incorrect disk usages after slave recovery.

This patch kills 'directory' in RunState and calculate the 'directory' correctly in ExecutorRunState.


Diffs (updated)
-----

  src/slave/containerizer/mesos/containerizer.cpp ec4626f903d44c0911093ff763ef16ad27c418a9 
  src/slave/state.hpp 0201e727585a86957c3116ee2fb36db8a4816010 
  src/slave/state.cpp 41f6c2c4bb68cca9569b528eda4fbc74d0cf934f 
  src/tests/disk_quota_tests.cpp 56d82eeb715080da40926f3661dbb7e66aeb3932 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 31772: Fixed a bug in PosixDiskIsolator during slave recovery.

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

(Updated March 5, 2015, 8:55 p.m.)


Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.


Changes
-------

Vinod's comments.


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


Repository: mesos


Description
-------

Fixed a bug in PosixDiskIsolator during slave recovery. See ticket for details.

Currently, RunState.directory points to the metadata directory. This would cause the PosixDiskIsolator to report incorrect disk usages after slave recovery.

This patch kills 'directory' in RunState and calculate the 'directory' correctly in ExecutorRunState.


Diffs (updated)
-----

  src/slave/containerizer/mesos/containerizer.cpp ec4626f903d44c0911093ff763ef16ad27c418a9 
  src/slave/state.hpp 0201e727585a86957c3116ee2fb36db8a4816010 
  src/slave/state.cpp 41f6c2c4bb68cca9569b528eda4fbc74d0cf934f 
  src/tests/disk_quota_tests.cpp 56d82eeb715080da40926f3661dbb7e66aeb3932 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 31772: Fixed a bug in PosixDiskIsolator during slave recovery.

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

> On March 5, 2015, 8:33 p.m., Vinod Kone wrote:
> > src/tests/disk_quota_tests.cpp, line 508
> > <https://reviews.apache.org/r/31772/diff/1/?file=886098#file886098line508>
> >
> >     why the if condition? is it possible for "disk_used_bytes" to not exist?

Yes, it's possible if the first 'du' hasn't finished (though unlikely). Added a TODO here.


- Jie


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


On March 5, 2015, 8:15 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31772/
> -----------------------------------------------------------
> 
> (Updated March 5, 2015, 8:15 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Bugs: MESOS-2452
>     https://issues.apache.org/jira/browse/MESOS-2452
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed a bug in PosixDiskIsolator during slave recovery. See ticket for details.
> 
> Currently, RunState.directory points to the metadata directory. This would cause the PosixDiskIsolator to report incorrect disk usages after slave recovery.
> 
> This patch kills 'directory' in RunState and calculate the 'directory' correctly in ExecutorRunState.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp ec4626f903d44c0911093ff763ef16ad27c418a9 
>   src/slave/state.hpp 0201e727585a86957c3116ee2fb36db8a4816010 
>   src/slave/state.cpp 41f6c2c4bb68cca9569b528eda4fbc74d0cf934f 
>   src/tests/disk_quota_tests.cpp 56d82eeb715080da40926f3661dbb7e66aeb3932 
> 
> Diff: https://reviews.apache.org/r/31772/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31772: Fixed a bug in PosixDiskIsolator during slave recovery.

Posted by Vinod Kone <vi...@gmail.com>.

> On March 5, 2015, 8:33 p.m., Vinod Kone wrote:
> > src/tests/disk_quota_tests.cpp, line 508
> > <https://reviews.apache.org/r/31772/diff/1/?file=886098#file886098line508>
> >
> >     why the if condition? is it possible for "disk_used_bytes" to not exist?
> 
> Jie Yu wrote:
>     Yes, it's possible if the first 'du' hasn't finished (though unlikely). Added a TODO here.

can you make it deterministic by setting an expectation on "PosixDiskIsolatorProcess::usage" dispatch?


- Vinod


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


On March 5, 2015, 8:55 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31772/
> -----------------------------------------------------------
> 
> (Updated March 5, 2015, 8:55 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Bugs: MESOS-2452
>     https://issues.apache.org/jira/browse/MESOS-2452
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed a bug in PosixDiskIsolator during slave recovery. See ticket for details.
> 
> Currently, RunState.directory points to the metadata directory. This would cause the PosixDiskIsolator to report incorrect disk usages after slave recovery.
> 
> This patch kills 'directory' in RunState and calculate the 'directory' correctly in ExecutorRunState.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp ec4626f903d44c0911093ff763ef16ad27c418a9 
>   src/slave/state.hpp 0201e727585a86957c3116ee2fb36db8a4816010 
>   src/slave/state.cpp 41f6c2c4bb68cca9569b528eda4fbc74d0cf934f 
>   src/tests/disk_quota_tests.cpp 56d82eeb715080da40926f3661dbb7e66aeb3932 
> 
> Diff: https://reviews.apache.org/r/31772/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 31772: Fixed a bug in PosixDiskIsolator during slave recovery.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31772/#review75385
-----------------------------------------------------------



src/slave/containerizer/mesos/containerizer.cpp
<https://reviews.apache.org/r/31772/#comment122398>

    add a CHECK_SOME(os::exists())?



src/tests/disk_quota_tests.cpp
<https://reviews.apache.org/r/31772/#comment122401>

    Looks like you do pause() the clock below? Move the comment to Clock::resume() below ?



src/tests/disk_quota_tests.cpp
<https://reviews.apache.org/r/31772/#comment122400>

    s/slaveReregistered/slaveReregisteredMessage/



src/tests/disk_quota_tests.cpp
<https://reviews.apache.org/r/31772/#comment122403>

    Maybe comment here that we resume because of the reaper?



src/tests/disk_quota_tests.cpp
<https://reviews.apache.org/r/31772/#comment122405>

    why the if condition? is it possible for "disk_used_bytes" to not exist?


- Vinod Kone


On March 5, 2015, 8:15 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31772/
> -----------------------------------------------------------
> 
> (Updated March 5, 2015, 8:15 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Bugs: MESOS-2452
>     https://issues.apache.org/jira/browse/MESOS-2452
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed a bug in PosixDiskIsolator during slave recovery. See ticket for details.
> 
> Currently, RunState.directory points to the metadata directory. This would cause the PosixDiskIsolator to report incorrect disk usages after slave recovery.
> 
> This patch kills 'directory' in RunState and calculate the 'directory' correctly in ExecutorRunState.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.cpp ec4626f903d44c0911093ff763ef16ad27c418a9 
>   src/slave/state.hpp 0201e727585a86957c3116ee2fb36db8a4816010 
>   src/slave/state.cpp 41f6c2c4bb68cca9569b528eda4fbc74d0cf934f 
>   src/tests/disk_quota_tests.cpp 56d82eeb715080da40926f3661dbb7e66aeb3932 
> 
> Diff: https://reviews.apache.org/r/31772/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>