Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove initialization of swarm but display useful error #615

Merged
merged 14 commits into from
Dec 4, 2018

Conversation

NicolasMahe
Copy link
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
container/container.go Outdated Show resolved Hide resolved
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
container/container.go Outdated Show resolved Hide resolved
container/container_test.go Outdated Show resolved Hide resolved
container/container.go Outdated Show resolved Hide resolved
@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