juju determines the unit IP addresss based on the last interface attached in openstack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
New
|
Undecided
|
Unassigned |
Bug Description
Juju is setting private and public-address to the last interface attached in openstack
1.23.2-
To start the unit IP for nova-compute/0 is 10.5.2.5
juju run --unit nova-compute/0 "unit-get private-address"
10.5.2.5
nova interface-attach --net-id 84bcae89-
nova interface-list 84bdd1ca-
+------
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------
| ACTIVE | 27f13f6c-
| ACTIVE | 4c9c65cc-
+------
juju set/relate $ANYTHING
juju run --unit nova-compute/0 "unit-get private-address"
ssh: connect to host 10.5.2.15 port 22: No route to host
ERROR subprocess encountered error code 255
Note juju now thinks the unit IP for nova-compute/0 is 10.5.2.15
At first I though this was because of the alpha numeric sorting
This instance the sorting left the original IP, 10.5.2.2, first
nova interface-list 9d0f4c64-
+------
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------
| ACTIVE | 9fa1157e-
| ACTIVE | b8a0fb95-
+------
juju set/relate $ANYTHING
juju run --unit keystone/0 "unit-get private-address"
ssh: connect to host 10.5.2.14 port 22: No route to host
ERROR subprocess encountered error code 255
But it still picks the "new" IP
This seems like a bug to me as the secondary interface may not be accessible from the deployment machine.
Unfortunately, this seems to be intermittent as during some test juju did not display this behaviour.
Logs available on request.
tags: | added: openstack-provider |