You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joerg Schad <jo...@mesosphere.io> on 2015/08/28 18:39:44 UTC

Review Request 37894: Renamed cgroups::kill to cgroups::signal.

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

Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.


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


Repository: mesos


Description
-------

As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.


Diffs
-----

  src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
  src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
  src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 

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


Testing
-------


Thanks,

Joerg Schad


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

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

> On Aug. 28, 2015, 4:45 p.m., Cong Wang wrote:
> > Why? Everyone knows kill(2) sends a signal while signal(2) installs a signal handler...

IMO, that naming is confusing, and should be 'signal' and 'install'.


- Jie


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


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

Posted by Timothy Chen <tn...@apache.org>.

> On Aug. 28, 2015, 4:45 p.m., Cong Wang wrote:
> > Why? Everyone knows kill(2) sends a signal while signal(2) installs a signal handler...
> 
> Jie Yu wrote:
>     IMO, that naming is confusing, and should be 'signal' and 'install'.
> 
> Joerg Schad wrote:
>     This is actually answering a discussion here https://reviews.apache.org/r/36620/#comment152376. And I agree that the original names are weird, but you are right in that we should have an open discussion about this. I will send a mail to dev later on...
> 
> Cong Wang wrote:
>     Like it or not, it is already a part of POSIX (if not just UNIX), pthread_kill() has the same "problem". It's just too late to change, as it simply breaks every programmer's expectation.
> 
> Jie Yu wrote:
>     This is cgroups::signal and cgroups::kill (has nothing to do with Posix kill and signal).
>     
>     It reads more natural: signal a cgroup, kill a cgroup. I don't think it'll confuse the reader.
>     
>     Are you suggesting that any thing suffixed with 'kill' should be linked to kill(2) in posix? I have to disagree with that.

I think I personally don't think we need to tie with POSIX, just need some comments to clarify what the intent is and I personally like to see this rename as well. Don't want this to sit and get stale again, Jie/Cong is there more to add or can we agree on this change?


- Timothy


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


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

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

> On Aug. 28, 2015, 4:45 p.m., Cong Wang wrote:
> > Why? Everyone knows kill(2) sends a signal while signal(2) installs a signal handler...
> 
> Jie Yu wrote:
>     IMO, that naming is confusing, and should be 'signal' and 'install'.
> 
> Joerg Schad wrote:
>     This is actually answering a discussion here https://reviews.apache.org/r/36620/#comment152376. And I agree that the original names are weird, but you are right in that we should have an open discussion about this. I will send a mail to dev later on...
> 
> Cong Wang wrote:
>     Like it or not, it is already a part of POSIX (if not just UNIX), pthread_kill() has the same "problem". It's just too late to change, as it simply breaks every programmer's expectation.

This is cgroups::signal and cgroups::kill (has nothing to do with Posix kill and signal).

It reads more natural: signal a cgroup, kill a cgroup. I don't think it'll confuse the reader.

Are you suggesting that any thing suffixed with 'kill' should be linked to kill(2) in posix? I have to disagree with that.


- Jie


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


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

Posted by Ben Mahler <be...@gmail.com>.

> On Aug. 28, 2015, 4:45 p.m., Cong Wang wrote:
> > Why? Everyone knows kill(2) sends a signal while signal(2) installs a signal handler...
> 
> Jie Yu wrote:
>     IMO, that naming is confusing, and should be 'signal' and 'install'.
> 
> Joerg Schad wrote:
>     This is actually answering a discussion here https://reviews.apache.org/r/36620/#comment152376. And I agree that the original names are weird, but you are right in that we should have an open discussion about this. I will send a mail to dev later on...
> 
> Cong Wang wrote:
>     Like it or not, it is already a part of POSIX (if not just UNIX), pthread_kill() has the same "problem". It's just too late to change, as it simply breaks every programmer's expectation.
> 
> Jie Yu wrote:
>     This is cgroups::signal and cgroups::kill (has nothing to do with Posix kill and signal).
>     
>     It reads more natural: signal a cgroup, kill a cgroup. I don't think it'll confuse the reader.
>     
>     Are you suggesting that any thing suffixed with 'kill' should be linked to kill(2) in posix? I have to disagree with that.
> 
> Timothy Chen wrote:
>     I think I personally don't think we need to tie with POSIX, just need some comments to clarify what the intent is and I personally like to see this rename as well. Don't want this to sit and get stale again, Jie/Cong is there more to add or can we agree on this change?

What's the plan for other utilities, like `os::killtree` and `os::kill`? Jie, what does it mean to "kill" a cgroup, send SIGKILL? Or destroy it completely? I thought that's why we have `cgroups::destroy`..?


- Ben


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


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

Posted by Cong Wang <cw...@twopensource.com>.

> On Aug. 28, 2015, 4:45 p.m., Cong Wang wrote:
> > Why? Everyone knows kill(2) sends a signal while signal(2) installs a signal handler...
> 
> Jie Yu wrote:
>     IMO, that naming is confusing, and should be 'signal' and 'install'.
> 
> Joerg Schad wrote:
>     This is actually answering a discussion here https://reviews.apache.org/r/36620/#comment152376. And I agree that the original names are weird, but you are right in that we should have an open discussion about this. I will send a mail to dev later on...

Like it or not, it is already a part of POSIX (if not just UNIX), pthread_kill() has the same "problem". It's just too late to change, as it simply breaks every programmer's expectation.


- Cong


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


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

Posted by Joerg Schad <jo...@mesosphere.io>.

> On Aug. 28, 2015, 4:45 p.m., Cong Wang wrote:
> > Why? Everyone knows kill(2) sends a signal while signal(2) installs a signal handler...
> 
> Jie Yu wrote:
>     IMO, that naming is confusing, and should be 'signal' and 'install'.

This is actually answering a discussion here https://reviews.apache.org/r/36620/#comment152376. And I agree that the original names are weird, but you are right in that we should have an open discussion about this. I will send a mail to dev later on...


- Joerg


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


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

Posted by Cong Wang <cw...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37894/#review96883
-----------------------------------------------------------


Why? Everyone knows kill(2) sends a signal while signal(2) installs a signal handler...

- Cong Wang


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 37894: Renamed cgroups::kill to cgroups::signal.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37894/#review96897
-----------------------------------------------------------


Patch looks great!

Reviews applied: [37894]

All tests passed.

- Mesos ReviewBot


On Aug. 28, 2015, 4:39 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37894/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2015, 4:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-3086
>     https://issues.apache.org/jira/browse/MESOS-3086
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> As this function is actually just sending the signal we renamed it. Additionally we want to introduce an actual cgroups::kill() with MESOS-3086.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 204c53038a1ccfa693f4f2293488cff8cdd60835 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
>   src/tests/containerizer/cgroups_tests.cpp 0b171eeb53037f26b7e952830e88e59f1278e7c6 
> 
> Diff: https://reviews.apache.org/r/37894/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>