Starting Mesos slave in Docker on Amazon Linux results in cgroup error -


i'm taking docker-compose setup that's working on mac, , trying running on couple of aws ec2 instances. mesos master docker container came fine, did zookeeper/marathon, mesos slave having trouble:

$ sudo docker run --name mesos-slave1 -p 5051:5051 \   -e "mesos_log_dir=/var/log" -e "mesos_master=zk://10.x.x.x:2181/mesos" \   -e "mesos_hostname=172.17.42.1" -e "mesos_port:5051" \   -e "mesos_isolator=cgroups/cpu,cgroups/mem" -e "mesos_containerizers=docker,mesos" \   -e "mesos_executor_registration_timeout:5mins" \   redjack/mesos-slave:0.21.0 i0708 19:26:09.559125     1 logging.cpp:172] info level logging started! i0708 19:26:09.569294     1 main.cpp:142] build: 2014-11-22 05:29:57 root i0708 19:26:09.569327     1 main.cpp:144] version: 0.21.0 i0708 19:26:09.569340     1 main.cpp:147] git tag: 0.21.0 i0708 19:26:09.569350     1 main.cpp:151] git sha: ab8fa655d34e8e15a4290422df38a18db1c09b5b failed create containerizer: not create dockercontainerizer: failed find mounted cgroups hierarchy 'cpu' subsystem; need mount cgroups manually! 

i've done various searches, , have tried things mounting /sys , similar approaches, no luck. i've tried running docker in privileged mode sanity check. docker-compose.yml specifies:

volumes: - /var/run/docker.sock:/var/run/docker.sock - /usr/local/bin/docker:/usr/local/bin/docker - /sys/fs/cgroup:/sys/fs/cgroup 

and started there, mounting on ec2 instance doesn't work either. since works on mac, there's difference between os x , amazon linux that's connected issue, haven't been able determine work-around. in case it's handy os identification purposes, on ec2 instance says:

$ uname -a linux ip-10-x-x-x 3.14.35-28.38.amzn1.x86_64 #1 smp wed mar 11 22:50:37 utc 2015 x86_64 x86_64 x86_64 gnu/linux 

i may end installing mesos directly on ec2 instance, convenient avoid using docker container, of course.

if anyone's stumbled across , found solution, please share! i'll post if figure out.

i post question when found 1 more thing try, , looks did it, figured i'd go ahead , post anyway after putting work in, , info may save else time spent trying figure out. looks key mount /cgroup volume, presumably difference between os x , amazon linux (aka centos variant). final docker incantation seems working:

$ sudo docker run --privileged=true --name mesos-slave1 -p 5051:5051 \   -e "mesos_log_dir=/var/log" -e "mesos_master=zk://10.x.x.x:2181/mesos" \   -e "mesos_hostname=172.17.42.1" -e "mesos_port:5051" \   -e "mesos_isolator=cgroups/cpu,cgroups/mem" \   -e "mesos_containerizers=docker,mesos" \   -e "mesos_executor_registration_timeout:5mins" \   -v /var/run/docker.sock:/var/run/docker.sock \   -v /usr/local/bin/docker:/usr/local/bin/docker -v /sys:/sys \   -v /cgroup:/cgroup redjack/mesos-slave:0.21.0 

i'm still experimenting can't sure whether privileged mode required, , whether of other volumes needed (the docker stuff). if saves else time, that's great.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -