- swarm_join can be called multiple times. Only new nodes will join the
discovery.
- swarm_join won't return until the nodes are visible in discovery
(swarm list).
- swarm_manage won't return until the nodes are visible in the manager.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
It used to output `[: -eq: unary operator expected` since the grep
command didn't give any output, therefore generating a syntax error.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
- `docker` will now use the CLI defined in $DOCKER_BINARY
- In order to communicate with the host docker, one must use
`docker_host`
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Since we were mapping the port back to the host anyway, this doesn't
change anything.
However, it does fix `docker exec`.
Fixes#658
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
We now have dockerswarm/dind:
- Much more lightweight.
- Exists in every version since Docker 1.0.0.
Depends on #700 as it cannot run on aufs.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Retry was kind of extracted from wait_until_reachable. The goal is to be
able to wait for a command to succeed, or fail if it doesn't succeed
after a defined number of attempts.
Indirectly improve the error logging: the output of the retry command
won't show up unless it constantly failed.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
- Do not run swarm using a function since it forks a subshell and we end
up killing it instead of the binary.
- Build a binary at each run instead of using go run. This is faster and
fixes the cleanup for the same reason as the subshell.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>