mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <>
Subject Slight change on Isolator interface on Linux
Date Tue, 29 Nov 2016 19:53:03 GMT
Hi folks,

I just landed MESOS-6648 <>,
which greatly simplified the launch path in MesosContainerizer.

The patch chain made MesosContainerizer launch helper to take
ContainerLaunchInfo. Prior to this patch, the launch helper takes various
flags from MesosContainerizer to launch the container. This makes it very
hard to add more parameters to the launch helper. This patch chain
simplifies this by passing 'ContainerLaunchInfo' instead.
'ContainerLaunchInfo' is also the protobuf message returned by isolators
during 'prepare()'. This makes it very easy to merge them and send it to
the launch helper. More importantly, this makes it very easy to add more
parameters to the launch helper in the future.

Because of this change, there is a slight change to ContainerLaunchInfo. We
changed the namespaces fields to `repeated`. This makes it easy for the
caller to merge ContainerLaunchInfo (simply leverage protobuf merge

   // (Linux only) The namespaces a nested container
   // should enter in its parent before cloning.
-  optional uint32 enter_namespaces = 9 [default = 0];
+  repeated int32 enter_namespaces = 9;

   // (Linux only) The namespaces that should be cloned for the container.
   // The namespaces are created while launching the executor.
-  optional uint32 clone_namespaces = 4 [default = 0];
+  repeated int32 clone_namespaces = 4;

The isolator change to adapt to this is simple, simply a one line change
line the following:

-  launchInfo.set_clone_namespaces(CLONE_NEWPID);
+  launchInfo.add_clone_namespaces(CLONE_NEWPID);

- Jie

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message