Bird
0
0

What will be the output of the command docker swarm init --advertise-addr 10.0.0.5 if the node is already part of a swarm?

medium📝 Command Output Q13 of 15
Docker - Swarm
What will be the output of the command docker swarm init --advertise-addr 10.0.0.5 if the node is already part of a swarm?
AError: This node is already part of a swarm
BSwarm initialized successfully with advertise address 10.0.0.5
CWarning: Advertise address ignored, node already in swarm
DSwarm initialized but advertise address not set
Step-by-Step Solution
Solution:
  1. Step 1: Understand swarm init behavior on existing swarm node

    If a node is already in a swarm, running docker swarm init again causes an error because it cannot reinitialize.
  2. Step 2: Check output messages

    The command will output an error message indicating the node is already part of a swarm, not success or warning.
  3. Final Answer:

    Error: This node is already part of a swarm -> Option A
  4. Quick Check:

    Init on existing swarm node = error [OK]
Quick Trick: Init fails if node already in swarm [OK]
Common Mistakes:
  • Assuming init overwrites existing swarm
  • Expecting a warning instead of error
  • Thinking advertise address is ignored silently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes