Hi
I have a 2 node Swarmkit cluster:
I was trying to create a user-defined overlay network like this:
swarmctl network create --driver overlay --name overlay1
swarmctl service create --name vote --network overlay1 --replicas 2 --image instavote/vote
I got following error:
WARN[1723] task updates not yet supported module=taskmanager task.id=dhf9k9na9t3lpfyhtjv6v8hbu
ERRO[1723] fatal task error error=Error response from daemon: datastore for scope "global" is not initialized module=taskmanager task.id=dhf9k9na9t3lpfyhtjv6v8hbu
The problem seems like the overlay network needed KV store because the scope chosen is global. I was able to workaround the problem above by starting Docker daemon with KV store.
Questions:
Is KV store a must for overlay network with swarmkit? I have used Docker 1.12 with overlay and no KV store and that worked fine. I have seen the mode defaults to swarm in that case. Is there a way to choose non-global option in swarmkit so that KV store can be avoided?
This is unrelated question. With swarmkit, I assume service discovery and dns will not work. I was trying to access service by service name and it did not work. The same worked with Docker 1.12.
Thanks
Sreenivas
Hi @smakam,
It's not necessary to use an external KV store for overlay networking with swarmkit. I'm not sure what's causing the error you're seeing, but you may want to try this using one of the prereleases of Docker 1.12 instead of running swarmctl directly. swarmctl is intended to be an example tool for development, but swarmkit is meant to be used as part of Docker 1.12+, for example when you run commands such as docker service ....
cc @mrjana @mavenugo
@smakam What Docker Engine version are you using with swarmctl? Before Docker 1.12, overlay has to use external K/V store.
After Docker 1.12, overlay uses external K/V store in non swarm mode, or uses built-in store for swarm mode. But you cannot mix them. If a node is enabled in swarm mode, it cannot use external K/V store.
Hi @aaronlehmann , @dongluochen
Thanks for your response. I am using Docker version 1.12.0-rc3. I am able to use Swarm mode in this version successfully with Docker engine with overlay network and without KV store.
I am having the issue only with Swarmkit. Since I created network with swarmctl, i assumed it will not need KV store. From error above, I feel that this is a bug or I am missing an option which will allow swarmkit to use the internal raft based scheme instead of KV.
Thanks
Sreenivas
@smakam Unfortunately, overlay networking without K/V store only works inside docker but not when using swarmkit directly.
This is because docker doesn't expose an API to allow swarmkit to inject networking information.
/cc @mrjana
Closing since the question was answered. Swarm mode networking isn't supported through swarmd and swarmctl - you need to use Docker's swarm mode (i.e. the docker service subcommand).
Hi folks:
here's my issue:
I have my own custom orchestration library build on top of old native Swarm using external KV Consul using pre-Docker 1.12.
Since SwarmKit are now shipped and integrated with Docker 1.12, how can I access/use the KV shipped with Docker 1.12 in Swarm Mode?. My point is to dispensed away from using an external KV store and just reused the SAME KV store that comes with the SwarmKit inside Docker 1.12. Is this even possible?. If so, how can I do it?
Most helpful comment
@smakam What Docker Engine version are you using with
swarmctl? Before Docker 1.12, overlay has to use external K/V store.After Docker 1.12, overlay uses external K/V store in non swarm mode, or uses built-in store for swarm mode. But you cannot mix them. If a node is enabled in swarm mode, it cannot use external K/V store.