diff --git a/command/join.go b/command/join.go index 88255e54bf..3ff34afc52 100644 --- a/command/join.go +++ b/command/join.go @@ -57,6 +57,11 @@ func (c *JoinCommand) Run(args []string) int { } } + if joins == 0 { + c.Ui.Error("Failed to join any nodes.") + return 1 + } + c.Ui.Output(fmt.Sprintf( "Successfully joined cluster by contacting %d nodes.", joins)) return 0