When add-machine exits with nonzero status, rerunning add-machine can produce a duplicate
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Unassigned |
Bug Description
As seen here:
http://
We ran "juju --debug add-machine -m manual-
2016-07-26 19:20:48 ERROR juju.environs.
2016-07-26 19:20:48 DEBUG juju.api apiclient.go:546 health ping failed: connection is shut down
2016-07-26 19:20:48 DEBUG juju.api apiclient.go:546 health ping failed: connection is shut down
2016-07-26 19:20:48 ERROR cmd supercommand.go:458 connection is shut down
2016-07-26 19:20:48 DEBUG cmd supercommand.go:459 (error details: [{github.
So we re-ran it:
WARNING add-machine failed. Will retry.
Sleeping for 30 seconds.
INFO juju --debug add-machine -m manual-
And then we had two copies of the same machine:
"0":
juju-status:
current: pending
since: 26 Jul 2016 19:19:10Z
dns-name: ec2-54-
instance-id: manual:
machine-status:
current: pending
since: 26 Jul 2016 19:19:10Z
series: precise
hardware: arch=amd64 cpu-cores=1 mem=7450M
"1":
juju-status:
current: started
since: 26 Jul 2016 19:21:12Z
version: 2.0-beta14
dns-name: ec2-54-
instance-id: manual:
machine-status:
current: pending
since: 26 Jul 2016 19:19:48Z
series: precise
hardware: arch=amd64 cpu-cores=1 mem=7450M
If add-machine fails, it should be safe to re-run it.
affects: | juju-core → juju |
I think perhaps the best option would be if running add-machine the second time would retry adding it as machine 0.