Skip to content

Remove initialization of swarm but display useful error#615

Merged
ilgooz merged 14 commits intodevfrom
feature/swar-init
Dec 4, 2018
Merged

Remove initialization of swarm but display useful error#615
ilgooz merged 14 commits intodevfrom
feature/swar-init

Conversation

@NicolasMahe
Copy link
Copy Markdown
Member

Closes #213

This PR remove the initialization of swarm from the container package, and display a useful error instead.

Example from a digital ocean droplet:

root@test-swarm-2:~# mesg-core
Docker Swarm is not initialized. Execute "docker swarm init" and try again
root@test-swarm-2:~# docker swarm init
Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on interface eth0 (128.199.243.244 and 10.15.0.8) - specify one with --advertise-addr
root@test-swarm-2:~# docker swarm init --advertise-addr 128.199.243.244
Swarm initialized: current node (sng5snnh5cm46yibdsz7bevq8) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-0kzu7i28acwa3pl0c5nsll7wo0z2xgb0pql54wlez70uwnybea-6d3kowvsni0oqztuxc7z3v2w9 128.199.243.244:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
root@test-swarm-2:~# mesg-core
MESG Core dev build test-swarm

Usage:
  mesg-core [command]

Available Commands:
  help        Help about any command
  logs        Show the Core's logs
  service     Manage services
  start       Start the Core
  status      Get the Core's status
  stop        Stop the Core

Flags:
  -h, --help         help for mesg-core
      --no-color     disable colorized output
      --no-spinner   disable spinners
      --version      version for mesg-core

Use "mesg-core [command] --help" for more information about a command.
root@test-swarm-2:~#

@NicolasMahe NicolasMahe self-assigned this Dec 3, 2018
Comment thread container/container.go Outdated
ilgooz and others added 2 commits December 4, 2018 09:24
@NicolasMahe NicolasMahe changed the title [WIP] Remove initialization of swarm but display useful error Remove initialization of swarm but display useful error Dec 4, 2018
ilgooz
ilgooz previously approved these changes Dec 4, 2018
Comment thread container/container.go Outdated
Comment thread container/container_test.go Outdated
Comment thread container/container.go Outdated
@ilgooz ilgooz merged commit 850799e into dev Dec 4, 2018
@ilgooz ilgooz deleted the feature/swar-init branch December 4, 2018 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants