← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1827489] [NEW] Wrong IPV6 address provided by openstack server create

 

Public bug reported:

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://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

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-network-smoke--884367252=10.100.0.5; tempest-network-smoke--18828977=2003::f816:3eff:febb:7456 |
<output omitted>

Then ssh to the instance and hit 'ip a' command:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP group default qlen 1000
    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:3eff:fe48:e8b5/64 scope link
      valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:bb:74:56 brd ff:ff:ff:ff:ff:ff
    inet6 2003::b47f:f400:ecca:2a55/64 scope global dynamic noprefixroute
      valid_lft 86385sec preferred_lft 14385sec
    inet6 fe80::7615:8d57:775d:fae/64 scope link noprefixroute
      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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1827489

Title:
  Wrong IPV6 address provided by openstack server create

Status in OpenStack Compute (nova):
  New

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://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

  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-network-smoke--884367252=10.100.0.5; tempest-network-smoke--18828977=2003::f816:3eff:febb:7456 |
  <output omitted>

  Then ssh to the instance and hit 'ip a' command:
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      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,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP group default qlen 1000
      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:3eff:fe48:e8b5/64 scope link
        valid_lft forever preferred_lft forever
  3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP group default qlen 1000
      link/ether fa:16:3e:bb:74:56 brd ff:ff:ff:ff:ff:ff
      inet6 2003::b47f:f400:ecca:2a55/64 scope global dynamic noprefixroute
        valid_lft 86385sec preferred_lft 14385sec
      inet6 fe80::7615:8d57:775d:fae/64 scope link noprefixroute
        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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1827489/+subscriptions


Follow ups