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 2019/05/24 06:46:13 UTC
Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/
-----------------------------------------------------------
Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, and Jiang Yan Xu.
Bugs: MESOS-9769
https://issues.apache.org/jira/browse/MESOS-9769
Repository: mesos
Description
-------
The `filesystem/linux` isolator was using pre-exec commands
to set up Linux ABI symlinks. Not only is this inefficient,
it has the undesirable security property of running programs
in a user-controlled container image.
The fix added a new `ContainerFileOperation` message to the
containerizer launch information. The containerizer executes
the requested file operation after performing the container
mounts.
Diffs
-----
include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
Diff: https://reviews.apache.org/r/70712/diff/1/
Testing
-------
sudo make check (Fedora 30)
Thanks,
James Peach
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo`.
Posted by Jie Yu <yu...@gmail.com>.
> On May 24, 2019, 10:45 p.m., Jiang Yan Xu wrote:
> > include/mesos/slave/containerizer.proto
> > Lines 207 (patched)
> > <https://reviews.apache.org/r/70712/diff/1/?file=2146613#file2146613line207>
> >
> > Nit: not all possible file operation have a source and a target? Would something like
> >
> > ```
> > message ContainerFileOperation {
> > ...
> > message Symlink {
> > optional string target = 1;
> > }
> >
> > optional string path = 2;
> > ```
> >
> > make more sense?
Yeah, I think this is a good point! Maybe we should just introduce inline types specifically for Symlink and kill top level fields
- Jie
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/#review215515
-----------------------------------------------------------
On May 24, 2019, 6:46 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70712/
> -----------------------------------------------------------
>
> (Updated May 24, 2019, 6:46 a.m.)
>
>
> Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
>
>
> Bugs: MESOS-9769
> https://issues.apache.org/jira/browse/MESOS-9769
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The `filesystem/linux` isolator was using pre-exec commands
> to set up Linux ABI symlinks. Not only is this inefficient,
> it has the undesirable security property of running programs
> in a user-controlled container image.
>
> The fix added a new `ContainerFileOperation` message to the
> containerizer launch information. The containerizer executes
> the requested file operation after performing the container
> mounts.
>
>
> Diffs
> -----
>
> include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
> src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
> src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
> src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
> src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
> src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
>
>
> Diff: https://reviews.apache.org/r/70712/diff/1/
>
>
> Testing
> -------
>
> sudo make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo`.
Posted by James Peach <jp...@apache.org>.
> On May 24, 2019, 10:45 p.m., Jiang Yan Xu wrote:
> > include/mesos/slave/containerizer.proto
> > Lines 207 (patched)
> > <https://reviews.apache.org/r/70712/diff/1/?file=2146613#file2146613line207>
> >
> > Nit: not all possible file operation have a source and a target? Would something like
> >
> > ```
> > message ContainerFileOperation {
> > ...
> > message Symlink {
> > optional string target = 1;
> > }
> >
> > optional string path = 2;
> > ```
> >
> > make more sense?
>
> Jie Yu wrote:
> Yeah, I think this is a good point! Maybe we should just introduce inline types specifically for Symlink and kill top level fields
Fixed!
- James
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/#review215515
-----------------------------------------------------------
On May 25, 2019, 6:44 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70712/
> -----------------------------------------------------------
>
> (Updated May 25, 2019, 6:44 a.m.)
>
>
> Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
>
>
> Bugs: MESOS-9769
> https://issues.apache.org/jira/browse/MESOS-9769
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The `filesystem/linux` isolator was using pre-exec commands
> to set up Linux ABI symlinks. Not only is this inefficient,
> it has the undesirable security property of running programs
> in a user-controlled container image.
>
> The fix added a new `ContainerFileOperation` message to the
> containerizer launch information. The containerizer executes
> the requested file operation after performing the container
> mounts.
>
>
> Diffs
> -----
>
> include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
> src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
> src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
> src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
> src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
> src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
>
>
> Diff: https://reviews.apache.org/r/70712/diff/2/
>
>
> Testing
> -------
>
> sudo make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo`.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/#review215515
-----------------------------------------------------------
include/mesos/slave/containerizer.proto
Lines 207 (patched)
<https://reviews.apache.org/r/70712/#comment302249>
Nit: not all possible file operation have a source and a target? Would something like
```
message ContainerFileOperation {
...
message Symlink {
optional string target = 1;
}
optional string path = 2;
```
make more sense?
- Jiang Yan Xu
On May 23, 2019, 11:46 p.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70712/
> -----------------------------------------------------------
>
> (Updated May 23, 2019, 11:46 p.m.)
>
>
> Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
>
>
> Bugs: MESOS-9769
> https://issues.apache.org/jira/browse/MESOS-9769
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The `filesystem/linux` isolator was using pre-exec commands
> to set up Linux ABI symlinks. Not only is this inefficient,
> it has the undesirable security property of running programs
> in a user-controlled container image.
>
> The fix added a new `ContainerFileOperation` message to the
> containerizer launch information. The containerizer executes
> the requested file operation after performing the container
> mounts.
>
>
> Diffs
> -----
>
> include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
> src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
> src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
> src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
> src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
> src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
>
>
> Diff: https://reviews.apache.org/r/70712/diff/1/
>
>
> Testing
> -------
>
> sudo make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo`.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/#review215514
-----------------------------------------------------------
Fix it, then Ship it!
This LGTM! Thanks James!
include/mesos/slave/containerizer.proto
Lines 272 (patched)
<https://reviews.apache.org/r/70712/#comment302248>
typo `conttainer`
- Jie Yu
On May 24, 2019, 6:46 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70712/
> -----------------------------------------------------------
>
> (Updated May 24, 2019, 6:46 a.m.)
>
>
> Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
>
>
> Bugs: MESOS-9769
> https://issues.apache.org/jira/browse/MESOS-9769
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The `filesystem/linux` isolator was using pre-exec commands
> to set up Linux ABI symlinks. Not only is this inefficient,
> it has the undesirable security property of running programs
> in a user-controlled container image.
>
> The fix added a new `ContainerFileOperation` message to the
> containerizer launch information. The containerizer executes
> the requested file operation after performing the container
> mounts.
>
>
> Diffs
> -----
>
> include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
> src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
> src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
> src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
> src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
> src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
>
>
> Diff: https://reviews.apache.org/r/70712/diff/1/
>
>
> Testing
> -------
>
> sudo make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo` message.
Posted by Gilbert Song <so...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/#review215557
-----------------------------------------------------------
Ship it!
Ship It!
- Gilbert Song
On May 26, 2019, 11:23 p.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70712/
> -----------------------------------------------------------
>
> (Updated May 26, 2019, 11:23 p.m.)
>
>
> Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
>
>
> Bugs: MESOS-9769
> https://issues.apache.org/jira/browse/MESOS-9769
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The `filesystem/linux` isolator was using pre-exec commands
> to set up Linux ABI symlinks, which is inefficient since it
> ends spawning `ln(1)` a number of times. The fix adds a new
> `ContainerFileOperation` message to the containerizer launch
> information. The containerizer executes the requested file
> operation after performing the container mounts.
>
>
> Diffs
> -----
>
> include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
> src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
> src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
> src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
> src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
> src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
>
>
> Diff: https://reviews.apache.org/r/70712/diff/3/
>
>
> Testing
> -------
>
> sudo make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo` message.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/#review215531
-----------------------------------------------------------
Patch looks great!
Reviews applied: [70712]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh
- Mesos Reviewbot
On May 27, 2019, 6:23 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70712/
> -----------------------------------------------------------
>
> (Updated May 27, 2019, 6:23 a.m.)
>
>
> Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
>
>
> Bugs: MESOS-9769
> https://issues.apache.org/jira/browse/MESOS-9769
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The `filesystem/linux` isolator was using pre-exec commands
> to set up Linux ABI symlinks, which is inefficient since it
> ends spawning `ln(1)` a number of times. The fix adds a new
> `ContainerFileOperation` message to the containerizer launch
> information. The containerizer executes the requested file
> operation after performing the container mounts.
>
>
> Diffs
> -----
>
> include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
> src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
> src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
> src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
> src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
> src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
>
>
> Diff: https://reviews.apache.org/r/70712/diff/3/
>
>
> Testing
> -------
>
> sudo make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo` message.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/
-----------------------------------------------------------
(Updated May 27, 2019, 6:23 a.m.)
Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
Summary (updated)
-----------------
Added filesystem operations to the `ContainerLaunchInfo` message.
Bugs: MESOS-9769
https://issues.apache.org/jira/browse/MESOS-9769
Repository: mesos
Description (updated)
-------
The `filesystem/linux` isolator was using pre-exec commands
to set up Linux ABI symlinks, which is inefficient since it
ends spawning `ln(1)` a number of times. The fix adds a new
`ContainerFileOperation` message to the containerizer launch
information. The containerizer executes the requested file
operation after performing the container mounts.
Diffs (updated)
-----
include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
Diff: https://reviews.apache.org/r/70712/diff/3/
Changes: https://reviews.apache.org/r/70712/diff/2-3/
Testing
-------
sudo make check (Fedora 30)
Thanks,
James Peach
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo`.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/
-----------------------------------------------------------
(Updated May 25, 2019, 6:44 a.m.)
Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
Bugs: MESOS-9769
https://issues.apache.org/jira/browse/MESOS-9769
Repository: mesos
Description
-------
The `filesystem/linux` isolator was using pre-exec commands
to set up Linux ABI symlinks. Not only is this inefficient,
it has the undesirable security property of running programs
in a user-controlled container image.
The fix added a new `ContainerFileOperation` message to the
containerizer launch information. The containerizer executes
the requested file operation after performing the container
mounts.
Diffs (updated)
-----
include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
Diff: https://reviews.apache.org/r/70712/diff/2/
Changes: https://reviews.apache.org/r/70712/diff/1-2/
Testing
-------
sudo make check (Fedora 30)
Thanks,
James Peach
Re: Review Request 70712: Added filesystem operations to the
`ContainerLaunchInfo`.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70712/#review215493
-----------------------------------------------------------
Patch looks great!
Reviews applied: [70712]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh
- Mesos Reviewbot
On May 24, 2019, 6:46 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70712/
> -----------------------------------------------------------
>
> (Updated May 24, 2019, 6:46 a.m.)
>
>
> Review request for mesos, Xudong Ni, Gilbert Song, Jie Yu, Jacob Janco, and Jiang Yan Xu.
>
>
> Bugs: MESOS-9769
> https://issues.apache.org/jira/browse/MESOS-9769
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The `filesystem/linux` isolator was using pre-exec commands
> to set up Linux ABI symlinks. Not only is this inefficient,
> it has the undesirable security property of running programs
> in a user-controlled container image.
>
> The fix added a new `ContainerFileOperation` message to the
> containerizer launch information. The containerizer executes
> the requested file operation after performing the container
> mounts.
>
>
> Diffs
> -----
>
> include/mesos/slave/containerizer.proto e9924489000efabebd55bf070f18149f23e4a510
> src/common/protobuf_utils.hpp 273ae270695db33b6c9d8b32cb38f8840a815787
> src/common/protobuf_utils.cpp 8b252cb11e17356836988dfc44a63953579a1def
> src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 8f94453a7354927ae918d3f2fd746cdf5ef63cb7
> src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 190054c26b949aa9ba0f49377b77d9e472edb95a
> src/slave/containerizer/mesos/launch.cpp 5ddb4c7d998c17b59164825acc0627a1311b691b
>
>
> Diff: https://reviews.apache.org/r/70712/diff/1/
>
>
> Testing
> -------
>
> sudo make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>