You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by James Peach <jp...@apache.org> on 2017/01/06 01:12:21 UTC
Review Request 55238: Use os::spawn in the CNI isolator.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/
-----------------------------------------------------------
Review request for mesos, Avinash sridharan and Jiang Yan Xu.
Bugs: MESOS-6862
https://issues.apache.org/jira/browse/MESOS-6862
Repository: mesos
Description
-------
Use os::spawn in the CNI isolator.
Diffs
-----
src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
Diff: https://reviews.apache.org/r/55238/diff/
Testing
-------
`sudo make check` (Fedora 25)
Thanks,
James Peach
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/
-----------------------------------------------------------
(Updated Jan. 17, 2017, 10:05 p.m.)
Review request for mesos, Avinash sridharan and Jiang Yan Xu.
Changes
-------
Rebase.
Bugs: MESOS-6862
https://issues.apache.org/jira/browse/MESOS-6862
Repository: mesos
Description
-------
Use os::spawn in the CNI isolator.
Diffs (updated)
-----
src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
Diff: https://reviews.apache.org/r/55238/diff/
Testing
-------
`sudo make check` (Fedora 25)
Thanks,
James Peach
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/
-----------------------------------------------------------
(Updated Jan. 13, 2017, 11:11 p.m.)
Review request for mesos, Avinash sridharan and Jiang Yan Xu.
Changes
-------
Rebased.
Bugs: MESOS-6862
https://issues.apache.org/jira/browse/MESOS-6862
Repository: mesos
Description
-------
Use os::spawn in the CNI isolator.
Diffs (updated)
-----
src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
Diff: https://reviews.apache.org/r/55238/diff/
Testing
-------
`sudo make check` (Fedora 25)
Thanks,
James Peach
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/#review161407
-----------------------------------------------------------
Ship it!
Ship It!
- Jiang Yan Xu
On Jan. 11, 2017, 4:26 p.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55238/
> -----------------------------------------------------------
>
> (Updated Jan. 11, 2017, 4:26 p.m.)
>
>
> Review request for mesos, Avinash sridharan and Jiang Yan Xu.
>
>
> Bugs: MESOS-6862
> https://issues.apache.org/jira/browse/MESOS-6862
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Use os::spawn in the CNI isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
>
> Diff: https://reviews.apache.org/r/55238/diff/
>
>
> Testing
> -------
>
> `sudo make check` (Fedora 25)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/
-----------------------------------------------------------
(Updated Jan. 12, 2017, 12:26 a.m.)
Review request for mesos, Avinash sridharan and Jiang Yan Xu.
Changes
-------
Rebase.
Bugs: MESOS-6862
https://issues.apache.org/jira/browse/MESOS-6862
Repository: mesos
Description
-------
Use os::spawn in the CNI isolator.
Diffs (updated)
-----
src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
Diff: https://reviews.apache.org/r/55238/diff/
Testing
-------
`sudo make check` (Fedora 25)
Thanks,
James Peach
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On Jan. 11, 2017, 2:11 a.m., Jiang Yan Xu wrote:
> > I feel if we keep `os::system()` in the codebase at all, this is one of the few places it could actually be used... we could eliminate it so we can say there's no references to `os::systems()` left today but it's a bit harsh to nit-picking on future use like this in order to keep a "clean state"?
>
> James Peach wrote:
> I don't consider this harsh, just a minor, obvious improvement. While `system()` is safe, `spawn()` is slightly better because it doesn't use the shell. We can't completely eliminate `system()` because there are places that actually require the shell (eg. the port mapping CNI plugin).
OK I guess if the command is a static string and trivial enough *and some shell features make it easier to write* then os::system still fine. For this case yes we can replace it.
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/#review161200
-----------------------------------------------------------
On Jan. 11, 2017, 4:26 p.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55238/
> -----------------------------------------------------------
>
> (Updated Jan. 11, 2017, 4:26 p.m.)
>
>
> Review request for mesos, Avinash sridharan and Jiang Yan Xu.
>
>
> Bugs: MESOS-6862
> https://issues.apache.org/jira/browse/MESOS-6862
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Use os::spawn in the CNI isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
>
> Diff: https://reviews.apache.org/r/55238/diff/
>
>
> Testing
> -------
>
> `sudo make check` (Fedora 25)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by Avinash sridharan <av...@mesosphere.io>.
> On Jan. 11, 2017, 10:11 a.m., Jiang Yan Xu wrote:
> > I feel if we keep `os::system()` in the codebase at all, this is one of the few places it could actually be used... we could eliminate it so we can say there's no references to `os::systems()` left today but it's a bit harsh to nit-picking on future use like this in order to keep a "clean state"?
>
> James Peach wrote:
> I don't consider this harsh, just a minor, obvious improvement. While `system()` is safe, `spawn()` is slightly better because it doesn't use the shell. We can't completely eliminate `system()` because there are places that actually require the shell (eg. the port mapping CNI plugin).
>
> Jiang Yan Xu wrote:
> OK I guess if the command is a static string and trivial enough *and some shell features make it easier to write* then os::system still fine. For this case yes we can replace it.
>
> Avinash sridharan wrote:
> As long as `ifconfig` is guaranteed to be an elf binary and not a script I think this should be ok. Looked at a few distributions and seems like that is the case.
>
> Jiang Yan Xu wrote:
> Why not a script? I tried to use os::spawn() with a script and it worked? Do you mean shell builtin commands?
My bad, please ignore my comment. I didn't realize we are not using `posix_spawn` internally. Should have verified the implementation.
- Avinash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/#review161200
-----------------------------------------------------------
On Jan. 12, 2017, 12:26 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55238/
> -----------------------------------------------------------
>
> (Updated Jan. 12, 2017, 12:26 a.m.)
>
>
> Review request for mesos, Avinash sridharan and Jiang Yan Xu.
>
>
> Bugs: MESOS-6862
> https://issues.apache.org/jira/browse/MESOS-6862
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Use os::spawn in the CNI isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
>
> Diff: https://reviews.apache.org/r/55238/diff/
>
>
> Testing
> -------
>
> `sudo make check` (Fedora 25)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On Jan. 11, 2017, 2:11 a.m., Jiang Yan Xu wrote:
> > I feel if we keep `os::system()` in the codebase at all, this is one of the few places it could actually be used... we could eliminate it so we can say there's no references to `os::systems()` left today but it's a bit harsh to nit-picking on future use like this in order to keep a "clean state"?
>
> James Peach wrote:
> I don't consider this harsh, just a minor, obvious improvement. While `system()` is safe, `spawn()` is slightly better because it doesn't use the shell. We can't completely eliminate `system()` because there are places that actually require the shell (eg. the port mapping CNI plugin).
>
> Jiang Yan Xu wrote:
> OK I guess if the command is a static string and trivial enough *and some shell features make it easier to write* then os::system still fine. For this case yes we can replace it.
>
> Avinash sridharan wrote:
> As long as `ifconfig` is guaranteed to be an elf binary and not a script I think this should be ok. Looked at a few distributions and seems like that is the case.
Why not a script? I tried to use os::spawn() with a script and it worked? Do you mean shell builtin commands?
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/#review161200
-----------------------------------------------------------
On Jan. 11, 2017, 4:26 p.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55238/
> -----------------------------------------------------------
>
> (Updated Jan. 11, 2017, 4:26 p.m.)
>
>
> Review request for mesos, Avinash sridharan and Jiang Yan Xu.
>
>
> Bugs: MESOS-6862
> https://issues.apache.org/jira/browse/MESOS-6862
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Use os::spawn in the CNI isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
>
> Diff: https://reviews.apache.org/r/55238/diff/
>
>
> Testing
> -------
>
> `sudo make check` (Fedora 25)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by Avinash sridharan <av...@mesosphere.io>.
> On Jan. 11, 2017, 10:11 a.m., Jiang Yan Xu wrote:
> > I feel if we keep `os::system()` in the codebase at all, this is one of the few places it could actually be used... we could eliminate it so we can say there's no references to `os::systems()` left today but it's a bit harsh to nit-picking on future use like this in order to keep a "clean state"?
>
> James Peach wrote:
> I don't consider this harsh, just a minor, obvious improvement. While `system()` is safe, `spawn()` is slightly better because it doesn't use the shell. We can't completely eliminate `system()` because there are places that actually require the shell (eg. the port mapping CNI plugin).
>
> Jiang Yan Xu wrote:
> OK I guess if the command is a static string and trivial enough *and some shell features make it easier to write* then os::system still fine. For this case yes we can replace it.
As long as `ifconfig` is guaranteed to be an elf binary and not a script I think this should be ok. Looked at a few distributions and seems like that is the case.
- Avinash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/#review161200
-----------------------------------------------------------
On Jan. 12, 2017, 12:26 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55238/
> -----------------------------------------------------------
>
> (Updated Jan. 12, 2017, 12:26 a.m.)
>
>
> Review request for mesos, Avinash sridharan and Jiang Yan Xu.
>
>
> Bugs: MESOS-6862
> https://issues.apache.org/jira/browse/MESOS-6862
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Use os::spawn in the CNI isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
>
> Diff: https://reviews.apache.org/r/55238/diff/
>
>
> Testing
> -------
>
> `sudo make check` (Fedora 25)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by James Peach <jp...@apache.org>.
> On Jan. 11, 2017, 10:11 a.m., Jiang Yan Xu wrote:
> > I feel if we keep `os::system()` in the codebase at all, this is one of the few places it could actually be used... we could eliminate it so we can say there's no references to `os::systems()` left today but it's a bit harsh to nit-picking on future use like this in order to keep a "clean state"?
I don't consider this harsh, just a minor, obvious improvement. While `system()` is safe, `spawn()` is slightly better because it doesn't use the shell. We can't completely eliminate `system()` because there are places that actually require the shell (eg. the port mapping CNI plugin).
- James
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/#review161200
-----------------------------------------------------------
On Jan. 6, 2017, 1:12 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55238/
> -----------------------------------------------------------
>
> (Updated Jan. 6, 2017, 1:12 a.m.)
>
>
> Review request for mesos, Avinash sridharan and Jiang Yan Xu.
>
>
> Bugs: MESOS-6862
> https://issues.apache.org/jira/browse/MESOS-6862
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Use os::spawn in the CNI isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
>
> Diff: https://reviews.apache.org/r/55238/diff/
>
>
> Testing
> -------
>
> `sudo make check` (Fedora 25)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 55238: Use os::spawn in the CNI isolator.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55238/#review161200
-----------------------------------------------------------
I feel if we keep `os::system()` in the codebase at all, this is one of the few places it could actually be used... we could eliminate it so we can say there's no references to `os::systems()` left today but it's a bit harsh to nit-picking on future use like this in order to keep a "clean state"?
- Jiang Yan Xu
On Jan. 5, 2017, 5:12 p.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55238/
> -----------------------------------------------------------
>
> (Updated Jan. 5, 2017, 5:12 p.m.)
>
>
> Review request for mesos, Avinash sridharan and Jiang Yan Xu.
>
>
> Bugs: MESOS-6862
> https://issues.apache.org/jira/browse/MESOS-6862
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Use os::spawn in the CNI isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ea91c71fdfac48a2fc1d31a0ee088a73244be367
>
> Diff: https://reviews.apache.org/r/55238/diff/
>
>
> Testing
> -------
>
> `sudo make check` (Fedora 25)
>
>
> Thanks,
>
> James Peach
>
>