Re: Review Request 27461: Change process reparent test to be recursive search for init

2014-11-03 Thread Ian Downes

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


Thinking a little, I believe walking up to pid 1 like this is unnecessary. 

The test is checking that the process has been reparented. I had incorrectly 
assumed that all systems would reparent to pid 1.

I think we can test reparenting by simply checking that the parent is *no 
longer* the child that forked it, and that it is still running, i.e., not 
zombied. I don't actually care who the new parent is, just that it has been 
reparented.

- Ian Downes


On Oct. 31, 2014, 8:03 p.m., Joris Van Remoortere wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27461/
> ---
> 
> (Updated Oct. 31, 2014, 8:03 p.m.)
> 
> 
> Review request for mesos and Ian Downes.
> 
> 
> Bugs: MESOS-2025
> https://issues.apache.org/jira/browse/MESOS-2025
> 
> 
> Repository: mesos-git
> 
> 
> Description
> ---
> 
> Reparenting does not always assign pid 1 (/sbin/init). If there is a user 
> init such as init --user with some other pid, this will be the new parent.
> Modify os_tests to check up the parent tree, and succeed if there is a path 
> to pid 1 without zombies along the way.
> This is not the cleanest fix, but I'm having trouble finding a way to find 
> the appropriate init to check for.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 3f39017 
> 
> Diff: https://reviews.apache.org/r/27461/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>



Re: Review Request 27461: Change process reparent test to be recursive search for init

2014-10-31 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [27461]

All tests passed.

- Mesos ReviewBot


On Nov. 1, 2014, 3:03 a.m., Joris Van Remoortere wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27461/
> ---
> 
> (Updated Nov. 1, 2014, 3:03 a.m.)
> 
> 
> Review request for mesos and Ian Downes.
> 
> 
> Bugs: MESOS-2025
> https://issues.apache.org/jira/browse/MESOS-2025
> 
> 
> Repository: mesos-git
> 
> 
> Description
> ---
> 
> Reparenting does not always assign pid 1 (/sbin/init). If there is a user 
> init such as init --user with some other pid, this will be the new parent.
> Modify os_tests to check up the parent tree, and succeed if there is a path 
> to pid 1 without zombies along the way.
> This is not the cleanest fix, but I'm having trouble finding a way to find 
> the appropriate init to check for.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 3f39017 
> 
> Diff: https://reviews.apache.org/r/27461/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>



Re: Review Request 27461: Change process reparent test to be recursive search for init

2014-10-31 Thread Joris Van Remoortere

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

(Updated Nov. 1, 2014, 3:03 a.m.)


Review request for mesos and Ian Downes.


Changes
---

make loop logic easier on the eye.


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


Repository: mesos-git


Description
---

Reparenting does not always assign pid 1 (/sbin/init). If there is a user init 
such as init --user with some other pid, this will be the new parent.
Modify os_tests to check up the parent tree, and succeed if there is a path to 
pid 1 without zombies along the way.
This is not the cleanest fix, but I'm having trouble finding a way to find the 
appropriate init to check for.


Diffs (updated)
-

  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 3f39017 

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


Testing
---

make check


Thanks,

Joris Van Remoortere



Re: Review Request 27461: Change process reparent test to be recursive search for init

2014-10-31 Thread Till Toenshoff

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



3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp


I think the following would be a bit easier on the eye, no? 

```while (currentProcess.isSome() && !currentProcess.get().zombie))```


- Till Toenshoff


On Nov. 1, 2014, 2:52 a.m., Joris Van Remoortere wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27461/
> ---
> 
> (Updated Nov. 1, 2014, 2:52 a.m.)
> 
> 
> Review request for mesos and Ian Downes.
> 
> 
> Bugs: MESOS-2025
> https://issues.apache.org/jira/browse/MESOS-2025
> 
> 
> Repository: mesos-git
> 
> 
> Description
> ---
> 
> Reparenting does not always assign pid 1 (/sbin/init). If there is a user 
> init such as init --user with some other pid, this will be the new parent.
> Modify os_tests to check up the parent tree, and succeed if there is a path 
> to pid 1 without zombies along the way.
> This is not the cleanest fix, but I'm having trouble finding a way to find 
> the appropriate init to check for.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 3f39017 
> 
> Diff: https://reviews.apache.org/r/27461/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>



Review Request 27461: Change process reparent test to be recursive search for init

2014-10-31 Thread Joris Van Remoortere

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

Review request for mesos and Ian Downes.


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


Repository: mesos-git


Description
---

Reparenting does not always assign pid 1 (/sbin/init). If there is a user init 
such as init --user with some other pid, this will be the new parent.
Modify os_tests to check up the parent tree, and succeed if there is a path to 
pid 1 without zombies along the way.
This is not the cleanest fix, but I'm having trouble finding a way to find the 
appropriate init to check for.


Diffs
-

  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 3f39017 

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


Testing
---

make check


Thanks,

Joris Van Remoortere