mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugen Feller (JIRA)" <>
Subject [jira] [Commented] (MESOS-1816) lxc execution driver support for docker containerizer
Date Sat, 11 Oct 2014 19:49:34 GMT


Eugen Feller commented on MESOS-1816:

Hi Timothy,

Thanks a lot for providing the patches. I finally ended up doing some changes in the docker.cpp
and test_framework.cpp files get it working (see the attached patches).

In the docker.cpp file: 

1) LXC + DHCP requires running in the priveleged mode. Might need to move the push_back line
to the appropriate place as it does not only apply for LXC (other use cases might benefit
from the priveleged mode).
2) Docker run expects multiple "--lxc-conf" flags to pass multiple settings instead of one.
For example: --lxc-conf=" = veth" --lxc-conf=" = br0" --lxc-conf="
= eth0" --lxc-conf=" = up".
3) Had to remove the spaces in the foreach loop push_back as lxc-conf does not accept them.

In the test_framework.cpp I have just added the necessary lxc lines. 

Best regards,

> lxc execution driver support for docker containerizer
> -----------------------------------------------------
>                 Key: MESOS-1816
>                 URL:
>             Project: Mesos
>          Issue Type: Improvement
>          Components: containerization
>    Affects Versions: 0.20.1
>            Reporter: Eugen Feller
>            Assignee: Timothy Chen
>              Labels: docker
>         Attachments: docker_patch.cpp, test_framework_patch.cpp
> Hi all,
> One way to get networking up and running in Docker is to use the bridge mode. The bridge
mode results in Docker automatically assigning IPs to the containers from the IP range specified
on the docker0 bridge.
> In our setup we need to manage IPs using our own DHCP server. Unfortunately this is not
supported by Docker's libcontainer execution driver. Instead, the lxc execution driver (
can be used. In order to use the lxc execution driver, Docker daemon needs to be started with
the "-e lxc" flag. Once started, Docker own networking can be disabled and lxc options can
be passed to the docker run command. For example:
> $ docker run -n=false --lxc-conf=" = veth" --lxc-conf="
= br0" --lxc-conf=" = eth0" -lxc-conf=" = up" ...
> This will force Docker to use my own bridge br0. Moreover, IP can be assigned to the
eth0 interface by executing the "dhclient eth0" command inside the started container.
> In the previous integration of Docker in Mesos (using Deimos), I have passed the aforementioned
options using the "options" flag in Marathon. However, with the new changes this is no longer
possible. It would be great to support the lxc execution driver in the current Docker integration.
> Thanks.
> Best regards,
> Eugen

This message was sent by Atlassian JIRA

View raw message