RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1859695 - [Cloud-init] DHCPv6 assigned address is not added to VM's interface
Summary: [Cloud-init] DHCPv6 assigned address is not added to VM's interface
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cloud-init
Version: 8.1
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Eduardo Otubo
QA Contact: Huijuan Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-22 17:28 UTC by vhariria
Modified: 2024-11-20 07:51 UTC (History)
13 users (show)

Fixed In Version: cloud-init-20.3-8.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:44:14 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cloud-init.tar.gz (169.26 KB, application/gzip)
2020-07-23 09:32 UTC, vhariria
no flags Details
/var/log/cloud-init for 19.4 (130.16 KB, text/plain)
2020-10-21 15:48 UTC, Tom Barron
no flags Details
tarball of /var/run/cloud-init with 19.4 (3.40 KB, application/gzip)
2020-10-21 15:54 UTC, Tom Barron
no flags Details
tarball of /var/log/cloud-init.log and /var/run/cloud-init using cloud-init.noarch 19.4-11.el8.eterrell202011181430 (17.04 KB, application/gzip)
2020-11-19 02:19 UTC, Tom Barron
no flags Details
tarball of /var/log/messages and NetworkManager journal after NetworkManager restart (22.23 KB, application/gzip)
2020-11-19 13:47 UTC, Tom Barron
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1888568 0 None None None 2020-07-22 20:28:21 UTC

Comment 2 vhariria 2020-07-23 09:32:15 UTC
Created attachment 1702197 [details]
cloud-init.tar.gz

Comment 10 Tom Barron 2020-07-29 22:58:01 UTC
vhari's client-init.log shows 'dhclient' command run with the IPv4 protocol, successful gain of lease, and then 'ip' commands that set the IPv4 address on eth0 using the address information gained from the lease (dhclient.log from 2019-11-13 14:56:53,696 forward).

I can do esentially the same commands manually for IPv6 successfully:

[root@vm2 ]# ./dhclient -6 -1 -v -lf /tmp/dhcpx/dhcp.leases -pf ./dhclient.pid eth1 -sf /bin/true
Internet Systems Consortium DHCP Client 4.3.6
Copyright 2004-2017 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on Socket/eth1
Sending on   Socket/eth1
Created duid "\000\004\337\261\013\207\0362N\007\221\333\013\264\335i\376\036".
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 3e:fd:9c:7d
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth1, interval 1020ms.
RCV: Advertise message on eth1 from fe80::f816:3eff:fe0b:eb77.
RCV:  X-- IA_NA 3e:fd:9c:7d
RCV:  | X-- starts 1596055664
RCV:  | X-- t1 - renew  +4294967295
RCV:  | X-- t2 - rebind +4294967295
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR fd00:fd00:fd00:7000::c0
RCV:  | | | X-- Preferred lifetime 4294967295.
RCV:  | | | X-- Max lifetime 4294967295.
RCV:  X-- Server ID: 00:03:00:01:fa:16:3e:0b:eb:77
RCV:  Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC:  X-- Initial candidate 00:03:00:01:fa:16:3e:0b:eb:77 (s: 10103, p: 0).
XMT: Forming Request, 0 ms elapsed.
XMT:  X-- IA_NA 3e:fd:9c:7d
XMT:  | X-- Requested renew  +3600
XMT:  | X-- Requested rebind +5400
XMT:  | | X-- IAADDR fd00:fd00:fd00:7000::c0
XMT:  | | | X-- Preferred lifetime +7200
XMT:  | | | X-- Max lifetime +7500
XMT:  V IA_NA appended.
XMT: Request on eth1, interval 1090ms.
RCV: Reply message on eth1 from fe80::f816:3eff:fe0b:eb77.
RCV:  X-- IA_NA 3e:fd:9c:7d
RCV:  | X-- starts 1596055665
RCV:  | X-- t1 - renew  +4294967295
RCV:  | X-- t2 - rebind +4294967295
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR fd00:fd00:fd00:7000::c0
RCV:  | | | X-- Preferred lifetime 4294967295.
RCV:  | | | X-- Max lifetime 4294967295.
RCV:  X-- Server ID: 00:03:00:01:fa:16:3e:0b:eb:77
PRC: Bound to lease 00:03:00:01:fa:16:3e:0b:eb:77.
[root@vm2]# cat /tmp/dhcpx/dhcp.leases 
default-duid "\000\004\337\261\013\207\0362N\007\221\333\013\264\335i\376\036";
lease6 {
  interface "eth1";
  ia-na 3e:fd:9c:7d {
    starts 1596055665;
    renew 4294967295;
    rebind 4294967295;
    iaaddr fd00:fd00:fd00:7000::c0 {
      starts 1596055665;
      preferred-life 4294967295;
      max-life 4294967295;
    }
  }
  option dhcp6.client-id 0:4:df:b1:b:87:1e:32:4e:7:91:db:b:b4:dd:69:fe:1e;
  option dhcp6.server-id 0:3:0:1:fa:16:3e:b:eb:77;
}
[root@vm2]# ip --family inet6 addr add fd00:fd00:fd00:7000::c0/64 dev eth1
[root@vm2]# ip a
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 1442 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:02:52:9c brd ff:ff:ff:ff:ff:ff
    inet 172.20.1.142/16 brd 172.20.255.255 scope global dynamic noprefixroute eth0
       valid_lft 32848sec preferred_lft 32848sec
    inet6 fe80::f816:3eff:fe02:529c/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:fd:9c:7d brd ff:ff:ff:ff:ff:ff
    inet 172.17.5.38/24 brd 172.17.5.255 scope global dynamic noprefixroute eth1
       valid_lft 34655sec preferred_lft 34655sec
    inet6 fd00:fd00:fd00:7000::c0/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fefd:9c7d/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

So we know dhclient and server (from OpenStack Neutron) are working correctly.

The question is why no corresponding V6 command sequence is being run.  Is cloud-init running the IPv4 commands directly, or somehow by means of NetworkManager?

Comment 11 Tom Barron 2020-07-30 12:59:41 UTC
None of 'ifdown eth1; ifupeth1', 'nmcli connection down <eth1-connection>; nmcli connection up <eth1-connection>', or 'nmcli device disconnect eth1; nmcli devince connect eth1' work for IPv6 dhcp stateful.  Inspection of the system journal when the commands are run shows dhclient run for IPv4 and not for IPv6.

If as a hack I add a NetworkManager dispatch script to run 'dhcpclient -6', then the interface will come up with the appropriate address:

[root@vm2 ~]# cat /etc/NetworkManager/dispatcher.d/12-dhclient6 
#!/bin/bash

dhclient -6 -1 -v -lf /tmp/dhcpx/dhcp.leases -pf /var/run/dhclient6.pid eth1 -sf /bin/true

[root@vm2 ~]# ifdown eth1
Connection 'System eth1' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/13)
[root@vm2 ~]# ifup eth1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/14)
[root@vm2 ~]# ip a
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 1442 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:02:52:9c brd ff:ff:ff:ff:ff:ff
    inet 172.20.1.142/16 brd 172.20.255.255 scope global dynamic noprefixroute eth0
       valid_lft 35693sec preferred_lft 35693sec
    inet6 fe80::f816:3eff:fe02:529c/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:fd:9c:7d brd ff:ff:ff:ff:ff:ff
    inet 172.17.5.38/24 brd 172.17.5.255 scope global dynamic noprefixroute eth1
       valid_lft 43196sec preferred_lft 43196sec
    inet6 fd00:fd00:fd00:7000::c0/128 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fefd:9c7d/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
[root@vm2 ~]# 

Note that I'm not saying a dispatch script is the fix, just reporting for debugging purposes.

Comment 13 Tom Barron 2020-08-02 10:30:25 UTC
(In reply to Tom Barron from comment #11)
> None of 'ifdown eth1; ifupeth1', 'nmcli connection down <eth1-connection>;
> nmcli connection up <eth1-connection>', or 'nmcli device disconnect eth1;
> nmcli devince connect eth1' work for IPv6 dhcp stateful.  Inspection of the
> system journal when the commands are run shows dhclient run for IPv4 and not
> for IPv6.
> 
> If as a hack I add a NetworkManager dispatch script to run 'dhcpclient -6',
> then the interface will come up with the appropriate address:
> 
> [root@vm2 ~]# cat /etc/NetworkManager/dispatcher.d/12-dhclient6 
> #!/bin/bash
> 
> dhclient -6 -1 -v -lf /tmp/dhcpx/dhcp.leases -pf /var/run/dhclient6.pid eth1
> -sf /bin/true
> 
> [root@vm2 ~]# ifdown eth1
> Connection 'System eth1' successfully deactivated (D-Bus active path:
> /org/freedesktop/NetworkManager/ActiveConnection/13)
> [root@vm2 ~]# ifup eth1
> Connection successfully activated (D-Bus active path:
> /org/freedesktop/NetworkManager/ActiveConnection/14)
> [root@vm2 ~]# ip a
> 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 1442 qdisc fq_codel state UP
> group default qlen 1000
>     link/ether fa:16:3e:02:52:9c brd ff:ff:ff:ff:ff:ff
>     inet 172.20.1.142/16 brd 172.20.255.255 scope global dynamic
> noprefixroute eth0
>        valid_lft 35693sec preferred_lft 35693sec
>     inet6 fe80::f816:3eff:fe02:529c/64 scope link 
>        valid_lft forever preferred_lft forever
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
> group default qlen 1000
>     link/ether fa:16:3e:fd:9c:7d brd ff:ff:ff:ff:ff:ff
>     inet 172.17.5.38/24 brd 172.17.5.255 scope global dynamic noprefixroute
> eth1
>        valid_lft 43196sec preferred_lft 43196sec
>     inet6 fd00:fd00:fd00:7000::c0/128 scope global noprefixroute 
>        valid_lft forever preferred_lft forever
>     inet6 fe80::f816:3eff:fefd:9c7d/64 scope link noprefixroute 
>        valid_lft forever preferred_lft forever
> [root@vm2 ~]# 
> 
> Note that I'm not saying a dispatch script is the fix, just reporting for
> debugging purposes.

It assigned fd00:fd00:fd00:7000::c0/128 though rather than fd00:fd00:fd00:7000::c0/64.  Probably need to just use dhclient -6 to get the address, then assign it via 'ip' command.

But it shows that dhcp server is working from the OpenStack side and that dhclient can solicit and obtain the address -- clooud-init and NetworkManager just aren't doing it.

Comment 14 Eduardo Otubo 2020-09-23 11:11:22 UTC
(In reply to Tom Barron from comment #13)
> (In reply to Tom Barron from comment #11)
> > None of 'ifdown eth1; ifupeth1', 'nmcli connection down <eth1-connection>;
> > nmcli connection up <eth1-connection>', or 'nmcli device disconnect eth1;
> > nmcli devince connect eth1' work for IPv6 dhcp stateful.  Inspection of the
> > system journal when the commands are run shows dhclient run for IPv4 and not
> > for IPv6.
> > 
> > If as a hack I add a NetworkManager dispatch script to run 'dhcpclient -6',
> > then the interface will come up with the appropriate address:
> > 
> > [root@vm2 ~]# cat /etc/NetworkManager/dispatcher.d/12-dhclient6 
> > #!/bin/bash
> > 
> > dhclient -6 -1 -v -lf /tmp/dhcpx/dhcp.leases -pf /var/run/dhclient6.pid eth1
> > -sf /bin/true
> > 
> > [root@vm2 ~]# ifdown eth1
> > Connection 'System eth1' successfully deactivated (D-Bus active path:
> > /org/freedesktop/NetworkManager/ActiveConnection/13)
> > [root@vm2 ~]# ifup eth1
> > Connection successfully activated (D-Bus active path:
> > /org/freedesktop/NetworkManager/ActiveConnection/14)
> > [root@vm2 ~]# ip a
> > 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 1442 qdisc fq_codel state UP
> > group default qlen 1000
> >     link/ether fa:16:3e:02:52:9c brd ff:ff:ff:ff:ff:ff
> >     inet 172.20.1.142/16 brd 172.20.255.255 scope global dynamic
> > noprefixroute eth0
> >        valid_lft 35693sec preferred_lft 35693sec
> >     inet6 fe80::f816:3eff:fe02:529c/64 scope link 
> >        valid_lft forever preferred_lft forever
> > 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
> > group default qlen 1000
> >     link/ether fa:16:3e:fd:9c:7d brd ff:ff:ff:ff:ff:ff
> >     inet 172.17.5.38/24 brd 172.17.5.255 scope global dynamic noprefixroute
> > eth1
> >        valid_lft 43196sec preferred_lft 43196sec
> >     inet6 fd00:fd00:fd00:7000::c0/128 scope global noprefixroute 
> >        valid_lft forever preferred_lft forever
> >     inet6 fe80::f816:3eff:fefd:9c7d/64 scope link noprefixroute 
> >        valid_lft forever preferred_lft forever
> > [root@vm2 ~]# 
> > 
> > Note that I'm not saying a dispatch script is the fix, just reporting for
> > debugging purposes.
> 
> It assigned fd00:fd00:fd00:7000::c0/128 though rather than
> fd00:fd00:fd00:7000::c0/64.  Probably need to just use dhclient -6 to get
> the address, then assign it via 'ip' command.
> 
> But it shows that dhcp server is working from the OpenStack side and that
> dhclient can solicit and obtain the address -- clooud-init and
> NetworkManager just aren't doing it.

From cloud-init.log provided I can identify 11 subsequent boot sequences, all of them using cloud-init version 18.5. On the first three boots, eth1 is not listed as one of the interfaces that needs to be configured. Actually that happens only on the fourth and seventh boot, only then I can see the situation you described, cloud-init configuring eth1 with dhcp4:

2020-04-23 11:12:28,812 - stages.py[DEBUG]: applying net config names for {'version': 1, 'config': [{'type': 'physical', 'mtu': 1450, 'subnets': [{'type': 'dhcp4'}], 'mac_address': 'fa:16:3e:c9:ae:0f', 'name': 'eth0'}, {'type': 'physical', 'mtu': 1500, 'subnets': [{'type': 'dhcp4'}], 'mac_address': 'fa:16:3e:42:17:79', 'name': 'eth1'}]}

The nineth and eleventh boots seems to be correctly handled by cloud-init as can see dhcp6 calls:

2020-07-22 20:54:47,110 - stages.py[INFO]: Applying network configuration from ds bringup=True: {'version': 1, 'config': [{'type': 'physical', 'mtu': 1442, 'subnets': [{'type': 'dhcp4'}], 'mac_address': 'fa:16:3e:1c:73:5f', 'name': 'eth0'}, {'type': 'physical', 'mtu': 1500, 'subnets': [{'type': 'dhcp6', 'netmask': 'ffff:ffff:ffff:ffff::', 'routes': [{'network': '::', 'netmask': '::', 'gateway': 'fd00:fd00:fd00:7000::1'}]}], 'mac_address': 'fa:16:3e:1d:21:5a', 'name': 'eth1'}]}

From that place (cloudinit/stages.py) I couldn't trace any error messages or places in the code which ip/dhcp*v6 commands could break, but I can see some fixes regarding this topic between 18.5 and 19.4. Would you be able to rerun these tests with a more updated version of cloud-init? Can you also paste configuration file?

Comment 16 Tom Barron 2020-09-23 11:56:37 UTC
(In reply to Eduardo Otubo from comment #14)
> (In reply to Tom Barron from comment #13)
> > (In reply to Tom Barron from comment #11)
> > > None of 'ifdown eth1; ifupeth1', 'nmcli connection down <eth1-connection>;
> > > nmcli connection up <eth1-connection>', or 'nmcli device disconnect eth1;
> > > nmcli devince connect eth1' work for IPv6 dhcp stateful.  Inspection of the
> > > system journal when the commands are run shows dhclient run for IPv4 and not
> > > for IPv6.
> > > 
> > > If as a hack I add a NetworkManager dispatch script to run 'dhcpclient -6',
> > > then the interface will come up with the appropriate address:
> > > 
> > > [root@vm2 ~]# cat /etc/NetworkManager/dispatcher.d/12-dhclient6 
> > > #!/bin/bash
> > > 
> > > dhclient -6 -1 -v -lf /tmp/dhcpx/dhcp.leases -pf /var/run/dhclient6.pid eth1
> > > -sf /bin/true
> > > 
> > > [root@vm2 ~]# ifdown eth1
> > > Connection 'System eth1' successfully deactivated (D-Bus active path:
> > > /org/freedesktop/NetworkManager/ActiveConnection/13)
> > > [root@vm2 ~]# ifup eth1
> > > Connection successfully activated (D-Bus active path:
> > > /org/freedesktop/NetworkManager/ActiveConnection/14)
> > > [root@vm2 ~]# ip a
> > > 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 1442 qdisc fq_codel state UP
> > > group default qlen 1000
> > >     link/ether fa:16:3e:02:52:9c brd ff:ff:ff:ff:ff:ff
> > >     inet 172.20.1.142/16 brd 172.20.255.255 scope global dynamic
> > > noprefixroute eth0
> > >        valid_lft 35693sec preferred_lft 35693sec
> > >     inet6 fe80::f816:3eff:fe02:529c/64 scope link 
> > >        valid_lft forever preferred_lft forever
> > > 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
> > > group default qlen 1000
> > >     link/ether fa:16:3e:fd:9c:7d brd ff:ff:ff:ff:ff:ff
> > >     inet 172.17.5.38/24 brd 172.17.5.255 scope global dynamic noprefixroute
> > > eth1
> > >        valid_lft 43196sec preferred_lft 43196sec
> > >     inet6 fd00:fd00:fd00:7000::c0/128 scope global noprefixroute 
> > >        valid_lft forever preferred_lft forever
> > >     inet6 fe80::f816:3eff:fefd:9c7d/64 scope link noprefixroute 
> > >        valid_lft forever preferred_lft forever
> > > [root@vm2 ~]# 
> > > 
> > > Note that I'm not saying a dispatch script is the fix, just reporting for
> > > debugging purposes.
> > 
> > It assigned fd00:fd00:fd00:7000::c0/128 though rather than
> > fd00:fd00:fd00:7000::c0/64.  Probably need to just use dhclient -6 to get
> > the address, then assign it via 'ip' command.
> > 
> > But it shows that dhcp server is working from the OpenStack side and that
> > dhclient can solicit and obtain the address -- clooud-init and
> > NetworkManager just aren't doing it.
> 
> From cloud-init.log provided I can identify 11 subsequent boot sequences,
> all of them using cloud-init version 18.5. On the first three boots, eth1 is
> not listed as one of the interfaces that needs to be configured. Actually
> that happens only on the fourth and seventh boot, only then I can see the
> situation you described, cloud-init configuring eth1 with dhcp4:
> 
> 2020-04-23 11:12:28,812 - stages.py[DEBUG]: applying net config names for
> {'version': 1, 'config': [{'type': 'physical', 'mtu': 1450, 'subnets':
> [{'type': 'dhcp4'}], 'mac_address': 'fa:16:3e:c9:ae:0f', 'name': 'eth0'},
> {'type': 'physical', 'mtu': 1500, 'subnets': [{'type': 'dhcp4'}],
> 'mac_address': 'fa:16:3e:42:17:79', 'name': 'eth1'}]}
> 
> The nineth and eleventh boots seems to be correctly handled by cloud-init as
> can see dhcp6 calls:
> 
> 2020-07-22 20:54:47,110 - stages.py[INFO]: Applying network configuration
> from ds bringup=True: {'version': 1, 'config': [{'type': 'physical', 'mtu':
> 1442, 'subnets': [{'type': 'dhcp4'}], 'mac_address': 'fa:16:3e:1c:73:5f',
> 'name': 'eth0'}, {'type': 'physical', 'mtu': 1500, 'subnets': [{'type':
> 'dhcp6', 'netmask': 'ffff:ffff:ffff:ffff::', 'routes': [{'network': '::',
> 'netmask': '::', 'gateway': 'fd00:fd00:fd00:7000::1'}]}], 'mac_address':
> 'fa:16:3e:1d:21:5a', 'name': 'eth1'}]}
> 
> From that place (cloudinit/stages.py) I couldn't trace any error messages or
> places in the code which ip/dhcp*v6 commands could break, but I can see some
> fixes regarding this topic between 18.5 and 19.4. Would you be able to rerun
> these tests with a more updated version of cloud-init? Can you also paste
> configuration file?

We did a lot of experiments including a bunch of hacks by me so that log is probably a mess -- sorry.

I've asked our QE to supply an OpenStack environment when she can where we can rerun with a more updated version of cloud-init and supply the configuration file.

Comment 19 Tom Barron 2020-09-30 14:03:38 UTC
(In reply to Eduardo Otubo from comment #14)
> Would you be able to rerun
> these tests with a more updated version of cloud-init? Can you also paste
> configuration file?

We have an environment available for re-test now.  Which updated version of cloud-init should we test with?

Comment 20 Eduardo Otubo 2020-10-05 08:21:22 UTC
(In reply to Tom Barron from comment #19)
> (In reply to Eduardo Otubo from comment #14)
> > Would you be able to rerun
> > these tests with a more updated version of cloud-init? Can you also paste
> > configuration file?
> 
> We have an environment available for re-test now.  Which updated version of
> cloud-init should we test with?

Please use latest update, cloud-init-19.4

Comment 21 Tom Barron 2020-10-21 15:48:16 UTC
Created attachment 1723247 [details]
/var/log/cloud-init for 19.4

Comment 22 Tom Barron 2020-10-21 15:54:53 UTC
Created attachment 1723248 [details]
tarball of /var/run/cloud-init with 19.4

Comment 23 Tom Barron 2020-10-21 16:39:53 UTC
(In reply to Eduardo Otubo from comment #20)
> (In reply to Tom Barron from comment #19)
> > (In reply to Eduardo Otubo from comment #14)
> > > Would you be able to rerun
> > > these tests with a more updated version of cloud-init? Can you also paste
> > > configuration file?
> > 
> > We have an environment available for re-test now.  Which updated version of
> > cloud-init should we test with?
> 
> Please use latest update, cloud-init-19.4

Sorry for the delay.  With a RHEL 8.2 guest and cloud-init 19.4-11.el8, the guest is fetching this network_data.json from Nova:

[root@demo-vm ~]# curl  http://169.254.169.254/openstack/2018-08-27/network_data.json
{"links": [{"id": "tap8d39e50a-a4", "vif_id": "8d39e50a-a44b-4d0c-81b3-8890fa05cb01", "type": "ovs", "mtu": 1450, "ethernet_mac_address": "fa:16:3e:1a:61:e7"}, {"id": "tap4cc1500b-09", "vif_id": "4cc1500b-0924-4bad-839d-e0e05b817dd9", "type": "ovs", "mtu": 1500, "ethernet_mac_address": "fa:16:3e:df:f7:04"}], "networks": [{"id": "network0", "type": "ipv4_dhcp", "link": "tap8d39e50a-a4", "network_id": "34c427a7-6b82-4bee-80b5-0259382cafed"}, {"id": "network1", "type": "ipv6_dhcpv6-stateful", "link": "tap4cc1500b-09", "ip_address": "fd00:fd00:fd00:7000::261", "netmask": "ffff:ffff:ffff:ffff::", "routes": [], "network_id": "2a2a8103-3138-4805-b591-86bed2459355", "services": []}], "services": [{"type": "dns", "address": "10.0.0.1"}]}

But it does not assign the IP address specified there to eth1:

[root@demo-vm ~]# ip a
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:1a:61:e7 brd ff:ff:ff:ff:ff:ff
    inet 172.20.1.148/16 brd 172.20.255.255 scope global dynamic noprefixroute eth0
       valid_lft 75666sec preferred_lft 75666sec
    inet6 fe80::f816:3eff:fe1a:61e7/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:df:f7:04 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f816:3eff:fedf:f704/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


Cloud-init set up these network scripts:

root@demo-vm ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=fa:16:3e:1a:61:e7
MTU=1450
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
[root@demo-vm ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEVICE=eth1
DHCPV6C=yes
HWADDR=fa:16:3e:df:f7:04
IPV6INIT=yes
IPV6_FORCE_ACCEPT_RA=yes
MTU=1500
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
[root@demo-vm ~]# 

I have added as attachements /var/log/cloud-init.log and a tarball of /var/run/cloud-init.

Thanks!

Comment 24 Eduardo Otubo 2020-11-18 13:35:05 UTC
[...]
> BOOTPROTO=dhcp
> DEVICE=eth0
> HWADDR=fa:16:3e:1a:61:e7
> MTU=1450
> ONBOOT=yes
> STARTMODE=auto
> TYPE=Ethernet
> USERCTL=no
> [root@demo-vm ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
> # Created by cloud-init on instance boot automatically, do not edit.
> #
> BOOTPROTO=none

I believe the reason dhclient -6 is not being called is because BOOTPROTO is none, did you try to setting it to "dhcp6"? This issue has a fix upstream but only for SUSE, not RHEL.

Comment 26 Tom Barron 2020-11-19 02:06:19 UTC
(In reply to Eduardo Otubo from comment #24)
> [...]
> > BOOTPROTO=dhcp
> > DEVICE=eth0
> > HWADDR=fa:16:3e:1a:61:e7
> > MTU=1450
> > ONBOOT=yes
> > STARTMODE=auto
> > TYPE=Ethernet
> > USERCTL=no
> > [root@demo-vm ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
> > # Created by cloud-init on instance boot automatically, do not edit.
> > #
> > BOOTPROTO=none
> 
> I believe the reason dhclient -6 is not being called is because BOOTPROTO is
> none, did you try to setting it to "dhcp6"? This issue has a fix upstream
> but only for SUSE, not RHEL.

I've tried rebooting with BOOTPROTO set to "dhcp6" and also with a build that sets that before the first boot but eht1 still isn't getting a global IPv6 address.

Comment 27 Tom Barron 2020-11-19 02:19:41 UTC
Created attachment 1730745 [details]
tarball of /var/log/cloud-init.log and /var/run/cloud-init using cloud-init.noarch 19.4-11.el8.eterrell202011181430

Comment 31 Tom Barron 2020-11-19 13:47:14 UTC
Created attachment 1730942 [details]
tarball of /var/log/messages and NetworkManager journal after NetworkManager restart

Comment 37 Eduardo Otubo 2020-11-24 09:06:26 UTC
pull-request opened upstream: https://github.com/canonical/cloud-init/pull/685

Comment 46 Eduardo Otubo 2021-01-06 12:54:13 UTC
New pull-request opened: https://github.com/canonical/cloud-init/pull/753

Comment 59 errata-xmlrpc 2021-05-18 15:44:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cloud-init bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1827


Note You need to log in before you can comment on or make changes to this bug.