andreaspeters opened a new pull request, #586: URL: https://github.com/apache/mesos/pull/586
With this PR I would like to add support for CNI (ContainerNetworkInterface) to the Docker Executor. As far as possible, I have followed the CNI implementation of the Mesos Containerizer. The following parameters and their default values are added to the Docker Executor: - network_cni_plugins_dir: /usr/lib/cni/ - network_cni_config_dir: /etc/mesos/cni/net.d **How is CNI used with Docker?** By setting a name on the mesosproto NetworkInfo object which matches the CNI name in the CNI configuration. Here is an example of a CNI configuration: ``` cat /etc/mesos/cni/net.d/10-mesos-net.conf { "cniVersion": "0.2.0", "name": "mesos-net", "type": "ipvlan", "bridge": "cni0", "isGateway": true, "ipMasq": true, "vlanId": 5, "ipam": { "type": "host-local", "ranges": [ [ { "subnet": "10.10.0.0/16", "rangeStart": "10.10.0.10", "rangeEnd": "10.10.0.250" } ] ], "routes": [ { "dst": "0.0.0.0/0" } ] } } ``` **How does the Docker Executor work?** If the name of the mesosproto NetworkInfo object has been set, the executor checks whether a CNI configuration exists for it. If this is the case, it is used to create a network interface in the container. If no CNI configuration exists, an error message appears in the stderr file in the sandbox directory. As the name can also be a Docker Network Plugin, the container is started in any case. If there is no Docker Network Plugin with the name, the container runs without an additional network interface. **How can the CNI support be tested?** I have added a test that can be used via the Mesos Test Tool. `mesos-tests --verbose --gtest_filter="DockerCniTest.*”` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@mesos.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org