juju determines the unit IP addresss based on the last interface attached in openstack

Bug #1452891 reported by David Ames
6
This bug affects 1 person
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-0ubuntu1~14.04.1~juju1

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-e8bb-4436-b9c1-be1c2fbc8774 84bdd1ca-7c15-48b1-8d5f-783a09fa4872
nova interface-list 84bdd1ca-7c15-48b1-8d5f-783a09fa4872
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| ACTIVE | 27f13f6c-edba-45e8-ad74-b29a3e5f1d46 | 84bcae89-e8bb-4436-b9c1-be1c2fbc8774 | 10.5.2.15 | fa:16:3e:2a:dd:0b |
| ACTIVE | 4c9c65cc-c28f-4f10-a035-05f9bc42b6f5 | 84bcae89-e8bb-4436-b9c1-be1c2fbc8774 | 10.5.2.5 | fa:16:3e:e7:d7:8e |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+

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-a824-450b-9198-5708f8987dd4
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| ACTIVE | 9fa1157e-a781-407a-a071-0957c846721e | 84bcae89-e8bb-4436-b9c1-be1c2fbc8774 | 10.5.2.2 | fa:16:3e:1a:79:73 |
| ACTIVE | b8a0fb95-459c-4083-bdb3-ff198651fb95 | 84bcae89-e8bb-4436-b9c1-be1c2fbc8774 | 10.5.2.14 | fa:16:3e:9b:e9:84 |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+

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.

Curtis Hovey (sinzui)
tags: added: openstack-provider
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.