weaveworks-guides / weave-net-legacy

Weave Net Old Guides
Apache License 2.0
88 stars 33 forks source link

Mesos Guide: update environment variable for .25 #119

Closed abuehrle closed 8 years ago

abuehrle commented 8 years ago

After following the tutorial, using the "executor_environment_variables" to set {"DOCKER_HOST":"unix:///var/run/weave/weave.sock"} so mesos uses weave, which worked well with mesos 0.23, I tried it in the staging environment where we're testing mesos 0.25, where it didn't work at all. Looking at the logs, I saw it was containers were started using /var/run/docker.sock or whatever the default docker socket was. I don't know when exactly this changed, but in 0.25, I was able to get it working by writing "/var/run/weave/weave.sock" to "docker_socket". Thought you'd like to note this in your docs (if you haven't already).

errordeveloper commented 8 years ago

This doesn't depend on the version of Mesos, but the version of Weave instead. However, I though the socket path has changed in master (and about to be part of 1.2 release), but will check now.

errordeveloper commented 8 years ago

Ok, so Weave v1.1.1 maintains compatibility and has a symlink from /var/run/weave.sock to /var/run/weave/weave.sock... I wonder why this didn't work?

errordeveloper commented 8 years ago

I don't know when exactly this changed, but in 0.25, I was able to get it working by writing "/var/run/weave/weave.sock" to "docker_socket".

I've overlooked this... Basically they just have added --docker_socket flag now, which is passed as -H and precedes DOCKER_HOST.

errordeveloper commented 8 years ago

MESOS-3187

getstek commented 8 years ago

I have tried to use the --docker_host option to start the slave, as per MESOS-3187 and that doesn't work. Mesos 0.25 says that is an unrecognized option.

I have the same issue trying to attach the Weave socket.

errordeveloper commented 8 years ago

@stephentknight thanks for your comment... We've been back and forth on this, I've checked the code and it currently sets MESOS_DOCKER_SOCKET=/var/run/weave/weave.sock as an environment variable, so that should definitely work.