juju created duplicate servers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
High
|
Unassigned |
Bug Description
Juju version: 2.9.33-ubuntu-amd64
During a recent deployment using the OpenStack provider I found that the ip address reported by juju status did not match the ip address of the unit when querying its network interfaces. On closer inspection that was because juju had created two servers with the same name. The ip address being reported by juju statue related to one server and the server I connected to using juju ssh connected to the other:
$ juju status vault/0 --format oneline
- vault/0: 172.20.0.175 (agent:idle, workload:blocked) 8200/tcp
So juju status shows vault has an ip address of 172.20.0.175
sshing to the unit shows a different ip:
$ juju ssh vault/0 "ip -o -4 a | grep 172"
2: ens3 inet 172.20.0.183/24 brd 172.20.0.255 scope global dynamic ens3\ valid_lft 38519sec preferred_lft 38519sec
Connection to 172.20.0.183 closed.
172.20.0.183 != 172.20.0.175
Querying openstack to see which servers have those IPs shows:
$ openstack server list | grep -E '172.20.
| c604e6f4-
| 7082589c-
Two servers both called juju-53f887-
I just ran "juju add-machine" and for a few seconds (the cloud is not particularly loaded at the moment) juju status showed this:
Machine State Address Inst id Series AZ Message c4d1-4310- 9d79-3e8842f545 57" has status BUILD, wait 10 seconds before retry, attempt 1
...
28 pending pending focal instance "19a71d00-
So even when nova replied a instance id, it looks like it wasn't immediately recorded in juju's database.