Ironic trying to contact IPA agent using its link local address during IPv6 deployment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ironic-python-agent |
Fix Released
|
High
|
Derek Higgins |
Bug Description
Description of problem:
During a deployment over IPv6, the IPA agent send ironic a "callback_url", this url is then used by ironic to communicate with the agent. In the latest version the agent appears to be picking up the IPv6 link local address instead of the routeable IPv6 address.
This results in ironic failing to contact the IPA agent
2017-11-16 02:58:08.463 22632 ERROR ironic.
Version-Release number of selected component (if applicable):
python-
python-
openstack-
How reproducible:
every time
Additional info:
tcpdump shows the wrong IP being sent to ironic
POST /v1/heartbeat/
Host: [fd00:1101:
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: application/json
User-Agent: python-
X-OpenStack-
Content-Type: application/json
Content-Length: 59
{"callback_url": "http://[fe80::
I suspect something has changed with the timing, the IPA agent used to select the slaac IP address to use, perhapes its now running earlier in the process before the slaac address is assigned.
Running some commands on a running IPA agent shows how this can happen if the fd00:1101.... hasn't been assigned to eth0
$ ip -o addr
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft forever
2: eth0 inet6 fd00:1101:
2: eth0 inet6 fe80::f816:
$ ip route get fd00:1101::1
fd00:1101::1 dev eth0 proto kernel src fd00:1101:
# Removing the fd00:1101:.. address shows the link-local address being returned (this is the command thats run by API to find the ip address to use)
# see ironic_
$ ip addr del fd00:1101:
$ ip route get fd00:1101::1
fd00:1101::1 dev eth0 proto kernel src fe80::f816:
As a test I've inserted a 5 second sleep into the IPA agent code, and deployment now works, so I think that the agent is running this command before the interface gets its slaac address, in previous versions it must have been after.
This real fix seem to belong to IPA.