Wrong IPV6 address provided by openstack server create
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
neutron |
Fix Released
|
Low
|
Brian Haley |
Bug Description
IPV6 address of an interface doesn't have to be derived from its MAC address. The newer kernels have addr_gen_mode option which controls the behavior of IPV6 calculation, see https:/
I've encountered the problem when I booted up an image (RHEL8 in my case) which had the addr_gen_mode option set to 1 (means that IPV6 address is randomized) by default. OpenStack (I had Rocky deployment) didn't recognize this and 'openstack server create' returned wrong address which lead to tempest failures because thanks to the 'openstack server create' output the tests expected different addresses on the interfaces.
Steps to reproduce:
$ openstack server create --image <rhel8> --flavor <flavor> --network <network1> --network <network2> --key-name <key_name> instance_name
+------
| Field | Value |
+------
<output omitted>
| accessIPv4 | |
| accessIPv6 | |
| addresses | tempest-
<output omitted>
Then ssh to the instance and hit 'ip a' command:
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,
link/ether fa:16:3e:48:e8:b5 brd ff:ff:ff:ff:ff:ff
inet 10.100.0.3/28 brd 10.100.0.15 scope global dynamic noprefixroute eth0
valid_lft 86363sec preferred_lft 86363sec
inet6 fe80::f816:
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,
link/ether fa:16:3e:bb:74:56 brd ff:ff:ff:ff:ff:ff
inet6 2003::b47f:
valid_lft 86385sec preferred_lft 14385sec
inet6 fe80::7615:
valid_lft forever preferred_lft forever
Notice that eth1 interface has an ipv6 address which seems not to be derived from its mac address. Also notice that the output of 'openstack server create' returned wrong address, a different one than it's actually set for eth1. It expected that the ipv6 address would be derived from the mac address but it wasn't.
'openstack server create' should be able to detect the option in the image and behave accordingly.
Changed in neutron: | |
importance: | Undecided → High |
Changed in neutron: | |
assignee: | nobody → Brian Haley (brian-haley) |
status: | New → In Progress |
Changed in neutron: | |
importance: | High → Low |
tags: | added: doc ipv6 stein-backport-potential |
tags: | added: pike-backport-potential queens-backport-potential rocky-backport-potential |
Changed in neutron: | |
status: | In Progress → Fix Released |
I proposed https:/ /review. opendev. org/#/c/ 656949/ to update the neutron docs with additional information on this, I can link this bug if we feel that is enough information to make this clearer.