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 2227767 - cloud-init enable both DHCPv4 and DHCPv6 when network type is ipv6_dhcpv6-stateful/ipv6_dhcpv6-stateless
Summary: cloud-init enable both DHCPv4 and DHCPv6 when network type is ipv6_dhcpv6-sta...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: cloud-init
Version: 9.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ani Sinha
QA Contact: xiachen
URL:
Whiteboard:
Depends On: 2046491
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-31 11:27 UTC by Ani Sinha
Modified: 2024-11-20 07:49 UTC (History)
19 users (show)

Fixed In Version: cloud-init-23.1.1-12.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2046491
Environment:
Last Closed: 2024-04-30 09:35:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/src cloud-init merge_requests 60 0 None None None 2023-09-12 16:19:53 UTC
Red Hat Issue Tracker RHELPLAN-163884 0 None None None 2023-07-31 11:29:38 UTC
Red Hat Issue Tracker RHELPLAN-167372 0 None None None 2023-09-07 06:53:51 UTC
Red Hat Issue Tracker RHELPLAN-167373 0 None None None 2023-09-07 06:53:56 UTC
Red Hat Product Errata RHBA-2024:2131 0 None None None 2024-04-30 09:35:56 UTC

Description Ani Sinha 2023-07-31 11:27:18 UTC
+++ This bug was initially created as a clone of Bug #2046491 +++

Description of problem:
Issue:
  cloud-init enable both DHCPv4 and DHCPv6 when network type is ipv6_dhcpv6-stateful.
  In this configuration both IPv6 and IPv4 DHCP is attemted, and NetworkManager will
  continue to to do DHCPv4 requests which it should not.

It should:
  Not set BOOTPROTO, DHCPV6C=yes is enough to enable DHCPv6.


Example metadata:
$ cat /mnt/openstack/latest/network_data.json
{"links": [{"id": "tapa0d73196-22", "vif_id": "a0d73196-22d3-454e-9780-8d74e4095e39", "type": "phy", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:2a:23:17"}], "networks": [{"id": "network0", "type": "ipv6_dhcpv6-stateful", "link": "tapa0d73196-22", "ip_address": "fd00:fd00:fd00:2::1:191", "netmask": "ffff:ffff:ffff:ffff::", "routes": [{"network": "::", "netmask": "::", "gateway": "fd00:fd00:fd00:2::fffe"}, {"network": "fd00:fd00:fd00:1::", "netmask": "ffff:ffff:ffff:ffff::", "gateway": "fd00:fd00:fd00:2::fffe"}, {"network": "fd00:fd00:fd00::", "netmask": "ffff:ffff:ffff:ffff::", "gateway": "fd00:fd00:fd00:2::fffe"}], "network_id": "d13eea09-f4a7-425c-94c8-45c6b92e1f99", "services": [{"type": "dns", "address": "fd00:fd00:fd00:0002::1"}]}], "services": [{"type": "dns", "address": "fd00:fd00:fd00:0002::1"}]}




Version-Release number of selected component (if applicable):
cloud-init-18.5-12.el8.noarch.rpm 

How reproducible:
100% reproducible

Steps to Reproduce:
1. Use the following network_data.json

$ cat /mnt/openstack/latest/network_data.json
{"links": [{"id": "tapa0d73196-22", "vif_id": "a0d73196-22d3-454e-9780-8d74e4095e39", "type": "phy", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:2a:23:17"}], "networks": [{"id": "network0", "type": "ipv6_dhcpv6-stateful", "link": "tapa0d73196-22", "ip_address": "fd00:fd00:fd00:2::1:191", "netmask": "ffff:ffff:ffff:ffff::", "routes": [{"network": "::", "netmask": "::", "gateway": "fd00:fd00:fd00:2::fffe"}, {"network": "fd00:fd00:fd00:1::", "netmask": "ffff:ffff:ffff:ffff::", "gateway": "fd00:fd00:fd00:2::fffe"}, {"network": "fd00:fd00:fd00::", "netmask": "ffff:ffff:ffff:ffff::", "gateway": "fd00:fd00:fd00:2::fffe"}], "network_id": "d13eea09-f4a7-425c-94c8-45c6b92e1f99", "services": [{"type": "dns", "address": "fd00:fd00:fd00:0002::1"}]}], "services": [{"type": "dns", "address": "fd00:fd00:fd00:0002::1"}]}

2. Spawn instance using above metadata


Actual results:

Resulting ifcfg file from cloud-init

$ cat /etc/sysconfig/network-scripts/ifcfg-ens3 
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=ens3
DHCPV6C=yes
HWADDR=fa:16:3e:2a:23:17
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_FORCE_ACCEPT_RA=yes
MTU=1442
ONBOOT=yes
TYPE=Ethernet
USERCTL=no


As can bee seen in NetworkManager journal, DHCPv4 is attempted over and over, failing each time. Because there is no DHCPv4 server.


Jan 26 17:53:44 instance0 NetworkManager[989]: <debug> [1643219624.9435] platform: (ens3) signal: link   added: 2: ens3 <DOWN;broadcast,multicast> mtu 1442 arp 1 ethernet? not-init addrgenmode eui64 addr FA:16:3E:2A:23:17 permaddr FA:16:3E:2A:23:17 brd FF:FF:FF:FF:FF:FF driver virtio_net rx:0,0 tx:0,0
Jan 26 17:53:44 instance0 NetworkManager[989]: <debug> [1643219624.9495] platform: (ens3) signal: link changed: 2: ens3 <DOWN;broadcast,multicast> mtu 1442 arp 1 ethernet? init addrgenmode eui64 addr FA:16:3E:2A:23:17 permaddr FA:16:3E:2A:23:17 brd FF:FF:FF:FF:FF:FF driver virtio_net rx:0,0 tx:0,0
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2448] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens3:9: key IPV6_FORCE_ACCEPT_RA is unknown and ignored
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2449] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens3:13: key USERCTL is unknown and ignored
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2498] ++ connection.id             = 'System ens3'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2499] ++ connection.interface-name = 'ens3'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2579] device[04d793736b6d4b30] (ens3): ifindex: set ifindex 2 (l3cfg: 6576436f5a1a9f1c)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2584] device[04d793736b6d4b30] (ens3): constructed (NMDeviceEthernet)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2584] device[04d793736b6d4b30] (ens3): start setup of NMDeviceEthernet, kernel ifindex 2
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2585] device[04d793736b6d4b30] (ens3): assume-state: set guess-assume=1, connection=(null)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2586] platform-linux: error reading net:/sys/class/net/ens3/phys_port_id: error reading 4096 bytes from file descriptor: Operation not supported
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2587] platform-linux: sysctl: reading 'net:/sys/class/net/ens3/dev_id': '0x0'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2589] platform-linux: error reading net:/sys/class/net/ens3/device/sriov_numvfs: Failed to open file "device/sriov_numvfs" with openat: No such file or directory
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2590] device[04d793736b6d4b30] (ens3): hw-addr: hardware address now FA:16:3E:2A:23:17
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2590] device[04d793736b6d4b30] (ens3): hw-addr: update initial MAC address FA:16:3E:2A:23:17
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2590] device[04d793736b6d4b30] (ens3): hw-addr: read permanent MAC address 'FA:16:3E:2A:23:17'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2592] device[04d793736b6d4b30] (ens3): unmanaged: flags set to [platform-init,!by-type=0x10/0x18/unmanaged/unrealized], set-managed [by-type=0x8])
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2593] device[04d793736b6d4b30] (ens3): unmanaged: flags set to [platform-init,!by-type,!user-settings=0x10/0x58/unmanaged/unrealized], set-managed [user-settings=0x40])
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2603] device[04d793736b6d4b30] (ens3): unmanaged: flags set to [!by-type,!platform-init,!user-settings=0x0/0x58/managed/unrealized], set-managed [platform-init=0x10])
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2604] device[04d793736b6d4b30] (ens3): unmanaged: flags set to [!sleeping,!by-type,!platform-init,!user-settings=0x0/0x59/managed/unrealized], set-managed [sleeping=0x1])
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.2644] manager: (ens3): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2650] device[04d793736b6d4b30] (ens3): assume-state: set guess-assume=0, connection=(null)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2650] manager: (ens3): assume: cannot generate connection: device has no existing configuration
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.2651] device (ens3): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2651] device[04d793736b6d4b30] (ens3): add_pending_action (1): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2653] platform-linux: sysctl: reading '/proc/sys/net/ipv6/conf/ens3/accept_ra': '1'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2654] platform-linux: sysctl: reading '/proc/sys/net/ipv6/conf/ens3/forwarding': '0'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2654] platform-linux: sysctl: reading '/proc/sys/net/ipv6/conf/ens3/disable_ipv6': '0'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2655] platform-linux: sysctl: reading '/proc/sys/net/ipv6/conf/ens3/hop_limit': '64'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2655] platform-linux: sysctl: reading '/proc/sys/net/ipv6/conf/ens3/use_tempaddr': '0'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2656] device[04d793736b6d4b30] (ens3): ip6: addrgenmode6: set none
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2659] platform: (ens3) signal: link changed: 2: ens3 <DOWN;broadcast,multicast> mtu 1442 arp 1 ethernet? init addrgenmode none addr FA:16:3E:2A:23:17 permaddr FA:16:3E:2A:23:17 brd FF:FF:FF:FF:FF:FF driver virtio_net rx:0,0 tx:0,0
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2659] device[04d793736b6d4b30] (ens3): queued link change for ifindex 2
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2660] device[04d793736b6d4b30] (ens3): ip6: addrgenmode6: toggle disable_ipv6 sysctl after disabling addr-gen-mode
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2661] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '1' (current value is '0')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2662] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '0' (current value is '1')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2734] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2735] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/accept_ra' to '0' (current value is '1')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2735] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/use_tempaddr' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2736] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/forwarding' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2736] device[04d793736b6d4b30] (ens3): bringing up device 2
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2755] platform: (ens3) signal: link changed: 2: ens3 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1442 arp 1 ethernet? init addrgenmode none addr FA:16:3E:2A:23:17 permaddr FA:16:3E:2A:23:17 brd FF:FF:FF:FF:FF:FF driver virtio_net rx:0,0 tx:0,0
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2758] platform: (ens3) signal: link changed: 2: ens3 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1442 arp 1 ethernet? init addrgenmode none addr FA:16:3E:2A:23:17 permaddr FA:16:3E:2A:23:17 brd FF:FF:FF:FF:FF:FF driver virtio_net rx:26,2892 tx:0,0
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.2760] device (ens3): carrier: link connected
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2763] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'queued-state-change-disconnected'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2763] device[04d793736b6d4b30] (ens3): queue-state[disconnected, reason:carrier-changed, id:27]: queue state change
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2795] device[04d793736b6d4b30] (ens3): preparing device
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2795] device[04d793736b6d4b30] (ens3): queue-state[disconnected, reason:carrier-changed, id:27]: clear queued state change
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2795] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'queued-state-change-disconnected'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2796] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/use_tempaddr' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2801] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'recheck-available'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2801] device[04d793736b6d4b30] (ens3): connectivity state changed from UNKNOWN to NONE
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2805] device[04d793736b6d4b30] (ens3): connectivity state changed from UNKNOWN to NONE
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.2806] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4078] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'queued-state-change-disconnected'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4079] device[04d793736b6d4b30] (ens3): queue-state[disconnected, reason:none, id:87]: queue state change
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4079] device[04d793736b6d4b30] (ens3): is available, will transition to disconnected
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4079] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'recheck-available'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4121] manager: (ens3): assume: cannot generate connection: device has no existing configuration
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4123] device[04d793736b6d4b30] (ens3): queue-state[disconnected, reason:none, id:87]: change state
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.4123] device (ens3): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4146] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4147] device[04d793736b6d4b30] (ens3): ip6: addrgenmode6: set none (already set)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4147] device[04d793736b6d4b30] (ens3): ip6: addrgenmode6: toggle disable_ipv6 sysctl after disabling addr-gen-mode
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4148] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '1' (current value is '0')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4151] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '0' (current value is '1')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4164] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4165] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/accept_ra' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4165] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/use_tempaddr' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4166] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/forwarding' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4171] device[04d793736b6d4b30] (ens3): add_pending_action (3): 'autoactivate'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4172] device[04d793736b6d4b30] (ens3): remove_pending_action (2): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4172] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'queued-state-change-disconnected'
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.4388] policy: auto-activating connection 'System ens3' (21d47e65-8523-1a06-af22-6f121086f085)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4390] active-connection[0x55c7481481c0]: set device "ens3" [0x55c7481bbe20]
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4390] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'activation-1'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4414] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'autoactivate'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4476] device[04d793736b6d4b30] (ens3): unmanaged: flags set to [!sleeping,!by-type,!platform-init,!user-explicit,!user-settings=0x0/0x79/managed], set-managed [user-explicit=0x20], reason user-requested)
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.4480] device (ens3): Activation: starting connection 'System ens3' (21d47e65-8523-1a06-af22-6f121086f085)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4480] device[04d793736b6d4b30] (ens3): activation-stage: schedule activate_stage1_device_prepare
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4500] device[04d793736b6d4b30] (ens3): activation-stage: invoke activate_stage1_device_prepare
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4500] device[04d793736b6d4b30] (ens3): ip4: set state pending (was none, reason: stage1)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4500] device[04d793736b6d4b30] (ens3): ip6: set state pending (was none, reason: stage1)
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.4502] device (ens3): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4502] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4508] manager: ActivatingConnection now System ens3
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4509] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4510] device[04d793736b6d4b30] (ens3): set-link: ignore link negotiation
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4510] device[04d793736b6d4b30] (ens3): activation-stage: synchronously invoke activate_stage2_device_config
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.4510] device (ens3): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4510] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4513] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4515] device[04d793736b6d4b30] (ens3): bringing up device 2
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4521] platform-linux: sysctl: reading '/proc/sys/net/ipv6/conf/ens3/mtu': '1442'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4545] device[04d793736b6d4b30] (ens3): activation-stage: synchronously invoke activate_stage3_ip_config
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4545] firewalld: [12b69fbe74bc3936,change*:"ens3"]: firewall zone change ens3:default (not running, simulate success)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4688] firewalld: [12b69fbe74bc3936,change*:"ens3"]: complete: fake success
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4688] device[04d793736b6d4b30] (ens3): activation-stage: synchronously invoke activate_stage3_ip_config
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4689] device[04d793736b6d4b30] (ens3): ip4: required-timeout: disabled
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4689] device[04d793736b6d4b30] (ens3): ip6: required-timeout: disabled
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.4690] device (ens3): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4690] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4695] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'in-state-change'
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4695] device[04d793736b6d4b30] (ens3): ip6: addrgenmode6: set none (already set)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4695] device[04d793736b6d4b30] (ens3): ip6: addrgenmode6: toggle disable_ipv6 sysctl after disabling addr-gen-mode
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4734] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '1' (current value is '0')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4737] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '0' (current value is '1')
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4740] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/accept_ra' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4741] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/disable_ipv6' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4742] device[04d793736b6d4b30] (ens3): ip:manual4: set state pending
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4743] device[04d793736b6d4b30] (ens3): ip:manual6: set state pending
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4744] device[04d793736b6d4b30] (ens3): ip:dhcp4: set state pending (was none)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4744] device[04d793736b6d4b30] (ens3): ipv4.dhcp-client-id: no explicit client-id configured
Jan 26 17:53:45 instance0 NetworkManager[989]: <info>  [1643219625.4774] dhcp4 (ens3): activation: beginning transaction (timeout in 45 seconds)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4788] device[04d793736b6d4b30] (ens3): ip:dhcp6: set state pending (was none)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.4997] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5033] platform-linux: sysctl: setting '/proc/sys/net/ipv6/conf/ens3/use_tempaddr' to '0' (current value is identical)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5064] device[04d793736b6d4b30] (ens3): ip:manual6: set state done
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5064] device[04d793736b6d4b30] (ens3): ip:manual4: set state done
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5064] device[04d793736b6d4b30] (ens3): ip: set (combined) state pending (was none, reason: check-ip-state)
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5186] platform: (ens3) address: adding or updating IPv6 address: fe80::f816:3eff:fe2a:2317/64 lft forever pref forever lifetime 1-0[4294967295,4294967295] dev 2 flags noprefixroute src unknown
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5191] platform: (ens3) signal: address 6   added: fe80::f816:3eff:fe2a:2317/64 lft forever pref forever lifetime 1-0[4294967295,4294967295] dev 2 flags tentative,permanent,noprefixroute src kernel
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5248] platform: (ens3) route: append     IPv6 route: type unicast fe80::/64 via :: dev 2 metric 1024 mss 0 rt-src ipv6ll
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5250] platform: (ens3) signal: route   6   added: type unicast fe80::/64 via :: dev 2 metric 1024 mss 0 rt-src rt-kernel
Jan 26 17:53:45 instance0 NetworkManager[989]: <debug> [1643219625.5512] manager: startup complete is waiting for device 'ens3' (activation-1)
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0015] platform: (ens3) signal: address 6 changed: fe80::f816:3eff:fe2a:2317/64 lft forever pref forever lifetime 3-0[4294967295,4294967295] dev 2 flags permanent,noprefixroute src kernel
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0016] platform: (ens3) signal: route   6   added: type local table 255 fe80::f816:3eff:fe2a:2317/128 via :: dev 2 metric 0 mss 0 rt-src rt-kernel
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0020] device[04d793736b6d4b30] (ens3): ipv6.dhcp-iaid: using 3042863103 (0xb55e67ff) IAID (str: 'ifname', explicit 0)
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0021] device[04d793736b6d4b30] (ens3): ipv6.dhcp-duid: generate lease DUID '00:04:2e:f9:f9:77:02:13:01:84:24:78:7b:fd:33:3c:38:44' (prefer lease)
Jan 26 17:53:47 instance0 NetworkManager[989]: <info>  [1643219627.0021] dhcp6 (ens3): activation: beginning transaction (timeout in 45 seconds)
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0124] dhcp6 (ens3): client event 12
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0125] dhcp6 (ens3): lease available
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0125] dhcp6 (ens3): option dhcp6_domain_search  => 'localdomain'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0126] dhcp6 (ens3): option dhcp6_name_servers   => 'fd00:fd00:fd00:2::1'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0126] dhcp6 (ens3): option fqdn_fqdn            => 'host-fd00-fd00-fd00-2--1-191.localdomain'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0126] dhcp6 (ens3): option ip6_address          => 'fd00:fd00:fd00:2::1:191'
Jan 26 17:53:47 instance0 NetworkManager[989]: <info>  [1643219627.0126] dhcp6 (ens3): state changed new lease, address=fd00:fd00:fd00:2::1:191
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0140] platform: (ens3) address: adding or updating IPv6 address: fe80::f816:3eff:fe2a:2317/64 lft forever pref forever lifetime 3-0[4294967295,4294967295] dev 2 flags noprefixroute src unknown
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0143] platform: (ens3) address: adding or updating IPv6 address: fd00:fd00:fd00:2::1:191/128 lft 86400sec pref 86400sec lifetime 3-0[86400,86400] dev 2 flags noprefixroute src unknown
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0190] platform: (ens3) signal: address 6   added: fd00:fd00:fd00:2::1:191/128 lft 86400sec pref 86400sec lifetime 3-3[86400,86400] dev 2 flags tentative,noprefixroute src kernel
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0191] platform: (ens3) route: append     IPv6 route: type unicast fd00:fd00:fd00:2::1:191/128 via :: dev 2 metric 100 mss 0 rt-src rt-kernel force-commit
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0194] platform: (ens3) signal: route   6   added: type unicast fd00:fd00:fd00:2::1:191/128 via :: dev 2 metric 100 mss 0 rt-src rt-kernel
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0199] device[04d793736b6d4b30] (ens3): ip:dhcp6: set state done (was pending)
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0199] dispatcher: (3) (ens3) dispatching action 'dhcp6-change'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0218] device[04d793736b6d4b30] (ens3): ip6: set state done (was pending, reason: check-ip-state)
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0220] device[04d793736b6d4b30] (ens3): ip: set (combined) state done (was pending, reason: check-ip-state)
Jan 26 17:53:47 instance0 NetworkManager[989]: <info>  [1643219627.0220] device (ens3): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0220] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'in-state-change'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0223] dispatcher: (4) (ens3) dispatching action 'pre-up' (with callback)
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0228] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'in-state-change'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0347] device[04d793736b6d4b30] (ens3): add_pending_action (2): 'queued-state-change-secondaries'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0347] device[04d793736b6d4b30] (ens3): queue-state[secondaries, reason:none, id:231]: queue state change
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0348] device[04d793736b6d4b30] (ens3): queue-state[secondaries, reason:none, id:231]: change state
Jan 26 17:53:47 instance0 NetworkManager[989]: <info>  [1643219627.0349] device (ens3): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0349] device[04d793736b6d4b30] (ens3): add_pending_action (3): 'in-state-change'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0351] device[04d793736b6d4b30] (ens3): add_pending_action (4): 'queued-state-change-activated'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0352] device[04d793736b6d4b30] (ens3): queue-state[activated, reason:none, id:232]: queue state change
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0352] device[04d793736b6d4b30] (ens3): device entered SECONDARIES state
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0353] device[04d793736b6d4b30] (ens3): remove_pending_action (3): 'in-state-change'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0353] device[04d793736b6d4b30] (ens3): remove_pending_action (2): 'queued-state-change-secondaries'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0354] device[04d793736b6d4b30] (ens3): queue-state[activated, reason:none, id:232]: change state
Jan 26 17:53:47 instance0 NetworkManager[989]: <info>  [1643219627.0354] device (ens3): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0354] device[04d793736b6d4b30] (ens3): add_pending_action (3): 'in-state-change'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0360] device[04d793736b6d4b30] (ens3): remove_pending_action (2): 'activation-1'
Jan 26 17:53:47 instance0 NetworkManager[989]: <info>  [1643219627.0364] device (ens3): Activation: successful, device activated.
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0365] device[04d793736b6d4b30] (ens3): set metered value 4
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0366] dispatcher: (5) (ens3) dispatching action 'up'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0373] device[04d793736b6d4b30] (ens3): connectivity state changed from NONE to LIMITED
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0382] platform: (ens3) address: adding or updating IPv6 address: fe80::f816:3eff:fe2a:2317/64 lft forever pref forever lifetime 3-0[4294967295,4294967295] dev 2 flags noprefixroute src unknown
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0392] platform: (ens3) address: adding or updating IPv6 address: fd00:fd00:fd00:2::1:191/128 lft 86400sec pref 86400sec lifetime 3-0[86400,86400] dev 2 flags noprefixroute src unknown
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0393] device[04d793736b6d4b30] (ens3): connectivity state changed from NONE to LIMITED
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0394] device[04d793736b6d4b30] (ens3): remove_pending_action (1): 'in-state-change'
Jan 26 17:53:47 instance0 NetworkManager[989]: <debug> [1643219627.0395] device[04d793736b6d4b30] (ens3): remove_pending_action (0): 'queued-state-change-activated'
Jan 26 17:53:48 instance0 NetworkManager[989]: <debug> [1643219628.2819] platform: (ens3) signal: address 6 changed: fd00:fd00:fd00:2::1:191/128 lft 86399sec pref 86399sec lifetime 4-3[86400,86400] dev 2 flags noprefixroute src kernel
Jan 26 17:53:48 instance0 NetworkManager[989]: <debug> [1643219628.2822] platform: (ens3) signal: route   6   added: type local table 255 fd00:fd00:fd00:2::1:191/128 via :: dev 2 metric 0 mss 0 rt-src rt-kernel
Jan 26 17:53:48 instance0 NetworkManager[989]: <debug> [1643219628.3994] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:53:53 instance0 NetworkManager[989]: <debug> [1643219633.0273] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:54:01 instance0 NetworkManager[989]: <debug> [1643219641.2130] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:54:18 instance0 NetworkManager[989]: <debug> [1643219658.1956] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:54:30 instance0 NetworkManager[989]: <debug> [1643219670.7676] device[04d793736b6d4b30] (ens3): ip:dhcp4: set state fail (was pending)
Jan 26 17:54:30 instance0 NetworkManager[989]: <debug> [1643219670.7680] device[04d793736b6d4b30] (ens3): ip4: set state fail (was pending, reason: check-ip-state)
Jan 26 17:54:45 instance0 NetworkManager[989]: <debug> [1643219685.3578] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens3:9: key IPV6_FORCE_ACCEPT_RA is unknown and ignored
Jan 26 17:54:45 instance0 NetworkManager[989]: <debug> [1643219685.3579] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens3:13: key USERCTL is unknown and ignored
Jan 26 17:54:45 instance0 NetworkManager[989]: <debug> [1643219685.7035] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens3:9: key IPV6_FORCE_ACCEPT_RA is unknown and ignored
Jan 26 17:54:45 instance0 NetworkManager[989]: <debug> [1643219685.7036] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens3:13: key USERCTL is unknown and ignored
Jan 26 17:54:45 instance0 NetworkManager[989]: <info>  [1643219685.7055] audit: op="connections-load" args="/etc/sysconfig/network-scripts/ifcfg-ens3" pid=1377 uid=0 result="success"
Jan 26 17:54:50 instance0 NetworkManager[989]: <debug> [1643219690.4466] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:55:55 instance0 NetworkManager[989]: <debug> [1643219755.2132] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:57:00 instance0 NetworkManager[989]: <debug> [1643219820.1728] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:58:04 instance0 NetworkManager[989]: <debug> [1643219884.8816] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 17:59:09 instance0 NetworkManager[989]: <debug> [1643219949.6232] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 18:00:03 instance0 NetworkManager[989]: <debug> [1643220003.1478] platform: (ens3) signal: route   6   added: type unicast ::/0 via fe80::f816:3eff:fec3:f46b dev 2 metric 1024 mss 0 rt-src rt-ra
Jan 26 18:00:03 instance0 NetworkManager[989]: <debug> [1643220003.1482] platform: (ens3) signal: route   6   added: type unicast fd00:fd00:fd00:2::/64 via :: dev 2 metric 256 mss 0 rt-src rt-kernel
Jan 26 18:00:13 instance0 NetworkManager[989]: <debug> [1643220013.6609] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 18:00:29 instance0 NetworkManager[989]: <debug> [1643220029.0510] platform: (ens3) signal: route   6 removed: type unicast ::/0 via fe80::f816:3eff:fec3:f46b dev 2 metric 1024 mss 0 rt-src rt-ra
Jan 26 18:01:17 instance0 NetworkManager[989]: <debug> [1643220077.9288] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 18:02:22 instance0 NetworkManager[989]: <debug> [1643220142.3718] dhcp4 (ens3): send DISCOVER to 255.255.255.255
Jan 26 18:03:27 instance0 NetworkManager[989]: <debug> [1643220207.1613] dhcp4 (ens3): send DISCOVER to 255.255.255.255

Expected results:
The ifcfg file created by cloud-init should not set BOOTPROTO, or set BOOTPROTO=none for network types
 - "ipv6_dhcpv6-stateful"
 - "ipv6_dhcpv6-stateless"

--- Additional comment from Red Hat Bugzilla on 2022-03-01 08:30:02 UTC ---

Account disabled by LDAP Audit

--- Additional comment from Emanuele Giuseppe Esposito on 2022-06-13 08:37:49 UTC ---

Hi Harald,
I think changing BOOTPROTO to none is not an ideal fix, because it conflicts with https://bugzilla.redhat.com/show_bug.cgi?id=1859695, which is the reason why we added BOOTPROTO=dhcp in the first place. 

I would like to ask networking people an opinion on this, so I am adding component and then switching to cloud-init to CC the relevant people.

Thank you,
Emanuele

--- Additional comment from Emanuele Giuseppe Esposito on 2022-06-13 08:40:07 UTC ---

Beniamino, do you have any suggestion on how to fix this without causing regressions?

Thank you,
Emanuele

--- Additional comment from Beniamino Galvani on 2022-06-13 13:56:52 UTC ---

In NM you can configure ipv4.method and ipv6.method independently. The
connection profile succeeds when any of them succeeds; you can also
set ipv4.may-fail=no or ipv6.may-fail=no (or both) to indicate that
one address family must succeed. If it doesn't, the connection profile
will fail.

If you configure this:

  BOOTPROTO=dhcp
  DHCPV6C=yes
  IPV6INIT=yes
  IPV6_AUTOCONF=no
  IPV6_FORCE_ACCEPT_RA=yes
  ...

that means:

  ipv4.method:                            auto
  ipv4.may-fail:                          yes
  ipv6.method:                            dhcp
  ipv6.may-fail:                          yes

With this configuration, the connection profile enters state
"ACTIVATED" as soon as one of IPv4 or IPv6 succeeds. If you need to
make IPv6 mandatory, set ipv6.may-fail=no which is expressed in the
ifcfg file as IPV6_FAILURE_FATAL=yes.

--

Note that "ipv6.method=dhcp" enables DHCPv6 and disables the parsing
of router advertisements. With this configuration, the machine only
gets a /128 address via DHCPv6 and gets no routes. This is different
from what is generally named as "stateful DHCPv6", where the default
route is still determined through RA, and the address through
DHCPv6. In NM, all the normal IPv6 configuration modes (SLAAC,
DHCP-stateless, DHCP-stateful) are configured by setting
ipv6.method=auto; the different behavior is chosen based on the flags
(Managed, OtherConfig) advertised by the router.

However, if the metadata server already provides routes explicitly
then probably ipv6.method=dhcp is fine, as NM only need to fetch the
/128 IPv6 address.

--

Back to the original question whether BOOTPROTO=dhcp makes sense for
the specific scenario: I don't know, it depends on whether you want
DHCPv4 to be optionally enabled when the metadata has
type:ipv6_dhcpv6-stateful.

I can only say that the fix at [1] doesn't seem correct, as
BOOTPROTO=dhcp (corresponding to ipv4.method=auto) doesn't have any
effect on IPv6.

In my opinion, for ipv6_dhcpv6-stateful networks you should set:

ipv6.method=auto|dhcp      # depending on whether you need to get routes via RA

ipv6.may-fail=no           # so that IPv6 needs to succeed (only useful if
                           # IPv4 is enabled as well)

ipv4.method=disabled|auto  # depending on whether you want IPv4 to be
                           # optionally configured in addition to IPv6
                           # or not

To see how that translates to ifcfg keys, either check the
'nm-settings-ifcfg-rh' man page, or create a profile with nmcli and
check the resulting connection file.

[1] https://github.com/canonical/cloud-init/pull/685

--- Additional comment from Harald Jensås on 2022-06-13 14:23:46 UTC ---

AFICT, the fix for RHBZ#1859695[1] was not to add BOOTPROTO=dhcp, it was adding IPV6_AUTOCONF=no[2]?
Adding BOOTPROTO=dhcp see RHBZ#1859695 comment 41[3] was a mistake.


[1] https://bugzilla.redhat.com/show_bug.cgi?id=1859695
[2] https://gitlab.cee.redhat.com/virt/cloud-init/-/merge_requests/29  (ref: https://bugzilla.redhat.com/show_bug.cgi?id=1859695#c47)
[3] https://bugzilla.redhat.com/show_bug.cgi?id=1859695#c41

--- Additional comment from Beniamino Galvani on 2022-06-13 15:57:56 UTC ---

Ah right, I missed the fixup MR.

Then, cloud-init should set:

  BOOTPROTO=dhcp
  IPV6_FAILURE_FATAL=yes

if it wants to also configure IPv4 - in such case IPv6 will be required and IPv4 optional. Or

  BOOTPROTO=none

to completely disable IPv4.

--- Additional comment from Emanuele Giuseppe Esposito on 2022-06-14 08:36:42 UTC ---

Ok, so I would say we can go with adding IPV6_FAILURE_FATAL=yes:

diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
index dc401d78f..cb3ef59cb 100644
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
@@ -441,6 +441,7 @@ class Renderer(renderer.Renderer):
                     iface_cfg["DHCPV6C"] = True
                     iface_cfg["IPV6INIT"] = True
                     iface_cfg["IPV6_AUTOCONF"] = False
+                    iface_cfg["IPV6_FAILURE_FATAL"] = True
                 else:
                     iface_cfg["IPV6INIT"] = True
                     # Configure network settings using DHCPv6

As far as I understood, it will fall back to ipv4 if ipv6 fails.

@Harald why do you think BOOTPROTO=dhcp was a mistake?

--- Additional comment from Emanuele Giuseppe Esposito on 2022-06-14 09:00:50 UTC ---

By the way, @Harald your cloud-init version seem to be 18.15-12, which means there is no BOOTPROTO flag set. I guess you set the wrong version in this BZ?

# setting base values
iface_cfg['BOOTPROTO'] = 'none'

# modifying base values according to subnets
for i, subnet in enumerate(subnets, start=len(iface_cfg.children)):
	[....]
	if subnet_type == 'dhcp6' or subnet_type == 'ipv6_dhcpv6-stateful':
	    # TODO need to set BOOTPROTO to dhcp6 on SUSE
	    iface_cfg['IPV6INIT'] = True
	    # Configure network settings using DHCPv6
	    iface_cfg['DHCPV6C'] = True
        elif subnet_type == 'ipv6_dhcpv6-stateless':
            [....]

As you can see, rhel 8.2 (18.15) just sets
IPV6INIT=yes
DHCPV6C=yes

Also, https://gitlab.cee.redhat.com/virt/cloud-init/-/merge_requests/29 was merged in cloud-init-20.3

This is a brew build for cloud-init-22.1.3.el9: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=45945027

Amy can you please test it to see if it solves the fix?

--- Additional comment from Beniamino Galvani on 2022-06-14 12:27:03 UTC ---

(In reply to Emanuele Giuseppe Esposito from comment #7)
> As far as I understood, it will fall back to ipv4 if ipv6 fails.

Not exactly. ipv4 and ipv6 are started in parallel; ipv4 is optional, while ipv6 is required.

'required' means that the 'network-online' systemd target is reached only after ipv6 has completed.

--- Additional comment from  on 2022-06-15 06:51:43 UTC ---

OK, I will test it when I am available and let you know the result.


(In reply to Emanuele Giuseppe Esposito from comment #8)
> By the way, @Harald your cloud-init version seem to be 18.15-12, which means
> there is no BOOTPROTO flag set. I guess you set the wrong version in this BZ?
> 
> # setting base values
> iface_cfg['BOOTPROTO'] = 'none'
> 
> # modifying base values according to subnets
> for i, subnet in enumerate(subnets, start=len(iface_cfg.children)):
> 	[....]
> 	if subnet_type == 'dhcp6' or subnet_type == 'ipv6_dhcpv6-stateful':
> 	    # TODO need to set BOOTPROTO to dhcp6 on SUSE
> 	    iface_cfg['IPV6INIT'] = True
> 	    # Configure network settings using DHCPv6
> 	    iface_cfg['DHCPV6C'] = True
>         elif subnet_type == 'ipv6_dhcpv6-stateless':
>             [....]
> 
> As you can see, rhel 8.2 (18.15) just sets
> IPV6INIT=yes
> DHCPV6C=yes
> 
> Also, https://gitlab.cee.redhat.com/virt/cloud-init/-/merge_requests/29 was
> merged in cloud-init-20.3
> 
> This is a brew build for cloud-init-22.1.3.el9:
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=45945027
> 
> Amy can you please test it to see if it solves the fix?

--- Additional comment from  on 2022-06-22 06:24:40 UTC ---

@Emanuele,

The scratch build was based on 22.1-3 networkmanager networking, can you provide a fix based on sysconfig networking please?

> This is a brew build for cloud-init-22.1.3.el9:
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=45945027
> 
> Amy can you please test it to see if it solves the fix?

--- Additional comment from  on 2022-06-22 08:13:43 UTC ---

@Harald,

I have questions about your case, 

When you launch an instance with a network which only supports IPv6, do you need to access OpenStack Metadata service to configure your instance?
Does your OpenStack support metadata service with IPv6-only tenant network?
https://bugs.launchpad.net/neutron/+bug/1460177

--- Additional comment from Harald Jensås on 2022-06-22 09:37:12 UTC ---

(In reply to Emanuele Giuseppe Esposito from comment #7)
> @Harald why do you think BOOTPROTO=dhcp was a mistake?

Because in the IPv6 only case setting BOOTPROTO=dhcp enables IPv4, See comment 6.
Enabling IPv4 is exactly why we see NetworkManager continue to to do DHCPv4 requests for ever and ever.

(In reply to Emanuele Giuseppe Esposito from comment #8)
> By the way, @Harald your cloud-init version seem to be 18.15-12, which means there is no BOOTPROTO flag set. I guess you set the wrong version in this BZ?

I must have reported the wrong RPM version. Sorry about that.


(In reply to xiachen  from comment #12)
> @Harald,
>
> I have questions about your case, 
> 
> When you launch an instance with a network which only supports IPv6, do you need to access OpenStack Metadata service to configure your instance?
> Does your OpenStack support metadata service with IPv6-only tenant network?
> https://bugs.launchpad.net/neutron/+bug/1460177
> 

No, the cloud I used does not support metadata service with IPv6. 
I used the config-drive[1][2] ($ openstack server create --config-drive true <...>)

With config drive the data-source is a partition on disk.



[1] https://docs.openstack.org/nova/train/user/metadata.html#config-drives
[2] https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html

--- Additional comment from Emanuele Giuseppe Esposito on 2022-06-22 12:54:17 UTC ---

Ok, I will assume we are talking about cloud-init 22.1 (before network-manager was added).

The problem now is that we have 2 scenarios:
1) CI 22.1 or earlier -- uses sysconfig and doesn't work properly
2) CI 22.1 + -- uses NM and should work correctly too

Amy, I would like to ask you to test 3 scenarios:

1) sysconfig on CI 22.1, with the fix in comment 7 only 
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=46117347

2) sysconfig on CI 22.1 with comment 7 fix and BOOTPROTO=none, please make sure there is no regression in https://bugzilla.redhat.com/show_bug.cgi?id=1859695 
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=46117395

3) CI 22.3, make sure this scenario passes too (brew is in comment 11)

Thank you,
Emanuele

--- Additional comment from  on 2022-06-27 05:42:13 UTC ---

This issue can be reproduced, set qa_ack+

OK, I will test the 3 scenarios and update the result here.

--- Additional comment from  on 2022-07-11 08:38:40 UTC ---

(In reply to Emanuele Giuseppe Esposito from comment #14)
> Ok, I will assume we are talking about cloud-init 22.1 (before
> network-manager was added).
> 
> The problem now is that we have 2 scenarios:
> 1) CI 22.1 or earlier -- uses sysconfig and doesn't work properly
> 2) CI 22.1 + -- uses NM and should work correctly too
> 
> Amy, I would like to ask you to test 3 scenarios:
> 
> 1) sysconfig on CI 22.1, with the fix in comment 7 only 
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=46117347

scenario 1,  still has the problem as bug description.


> 
> 2) sysconfig on CI 22.1 with comment 7 fix and BOOTPROTO=none, please make
> sure there is no regression in
> https://bugzilla.redhat.com/show_bug.cgi?id=1859695 
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=46117395

scenario 2,  the problem is fixed, but we don't have storageNFS network, so I asked others to help test and make sure there is no regression in https://bugzilla.redhat.com/show_bug.cgi?id=1859695#c60

> 
> 3) CI 22.3, make sure this scenario passes too (brew is in comment 11)
> 

scenario 3, the brew build in comment#11 changes sysconfig, however sysconfig could not work in cloud-init 22.3, so I just test 22.1-4.el9 using NM, it has the problem as bug description.
I think we'd better file a new bug to track the problem because of different solution for NM not sysconfig.

--- Additional comment from  on 2022-07-11 08:42:13 UTC ---

@haralad,

the problem can NOT reproduce with  

 - "ipv6_dhcpv6-stateless"

Can you help to confirm it again?

--- Additional comment from Eduardo Otubo on 2022-07-14 08:10:49 UTC ---

(In reply to xiachen from comment #16)
> (In reply to Emanuele Giuseppe Esposito from comment #14)
> > Ok, I will assume we are talking about cloud-init 22.1 (before
> > network-manager was added).
> > 
> > The problem now is that we have 2 scenarios:
> > 1) CI 22.1 or earlier -- uses sysconfig and doesn't work properly
> > 2) CI 22.1 + -- uses NM and should work correctly too
> > 
> > Amy, I would like to ask you to test 3 scenarios:
> > 
> > 1) sysconfig on CI 22.1, with the fix in comment 7 only 
> > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=46117347
> 
> scenario 1,  still has the problem as bug description.
> 
> 
> > 
> > 2) sysconfig on CI 22.1 with comment 7 fix and BOOTPROTO=none, please make
> > sure there is no regression in
> > https://bugzilla.redhat.com/show_bug.cgi?id=1859695 
> > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=46117395
> 
> scenario 2,  the problem is fixed, but we don't have storageNFS network, so
> I asked others to help test and make sure there is no regression in
> https://bugzilla.redhat.com/show_bug.cgi?id=1859695#c60

IIUC the above explanation from Beniamino (thanks for that, btw!) BOOTPROTO indeed only affects ipv4. Rearding back through bz#1859695 we indeed didn't test the scenario where we set all other variables and leave BOOTPROTO=none, but I believe it won't cause any regressions. We can wait until we have a definitive proof, but I think this won't cause any trouble and we could move forward and have it changed to fix this BZ.

> 
> > 
> > 3) CI 22.3, make sure this scenario passes too (brew is in comment 11)
> > 
> 
> scenario 3, the brew build in comment#11 changes sysconfig, however
> sysconfig could not work in cloud-init 22.3, so I just test 22.1-4.el9 using
> NM, it has the problem as bug description.
> I think we'd better file a new bug to track the problem because of different
> solution for NM not sysconfig.

--- Additional comment from Eduardo Otubo on 2022-07-14 08:28:25 UTC ---

As this is a RHEL-8.2 bug, I'm setting priority to medium (all 'high' BZs must be fixed first).

Thanks!

--- Additional comment from Emanuele Giuseppe Esposito on 2022-07-14 14:19:20 UTC ---

@haralad, can you provide the exact cloud-init version where you detect this problem?

--- Additional comment from Emanuele Giuseppe Esposito on 2022-12-14 08:53:49 UTC ---

I won't close the BZ for now, but resetting assignee to default. Once we have more resources, we will work on this.

--- Additional comment from Ani Sinha on 2023-05-02 08:41:20 UTC ---

Can we please summarise what issues needs fixing after the latest cloud-init rebase on RHEL 8.9? 
cc: @xiachen

--- Additional comment from  on 2023-05-18 07:26:30 UTC ---

For ipv6_dhcpv6-stateful networks, 

1. when using sysconfig render, cloud-init should set:

  BOOTPROTO=none
  IPV6_FAILURE_FATAL=yes

and I tested the scratch build that Emanuele made, it worked but it didn't merge. so @Ani, could you make a fix with this solution please?

> 2) sysconfig on CI 22.1 with comment 7 fix and BOOTPROTO=none, please make
> sure there is no regression in
> https://bugzilla.redhat.com/show_bug.cgi?id=1859695 

2. while using NM render, based on comment#4, it should set:

ipv6.method=auto|dhcp      # depending on whether you need to get routes via RA

ipv6.may-fail=no           # so that IPv6 needs to succeed (only useful if
                           # IPv4 is enabled as well)

ipv4.method=disabled|auto  # depending on whether you want IPv4 to be
                           # optionally configured in addition to IPv6
                           # or not
I will test the solution in BZ#2207716 and see if it works for ipv6_dhcpv6-stateful only networks without IPv4.


(In reply to Ani Sinha from comment #22)
> Can we please summarise what issues needs fixing after the latest cloud-init
> rebase on RHEL 8.9?

--- Additional comment from RHEL Program Management on 2023-06-26 07:28:07 UTC ---

30-day auto-close warning: This bz has been open for an extended time without being approved for a release (has a release+ or zstream+ flag) .  Please consider prioritizing the work appropriately to get it approved for a release, or close the bz.  Otherwise, if it is still open on the “Stale date”, it will close automatically (CLOSED WONTFIX).

--- Additional comment from RHEL Program Management on 2023-07-26 07:28:16 UTC ---

After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

--- Additional comment from RHEL Program Management on 2023-07-28 10:45:43 UTC ---

This bug was reopened or transitioned from a non-RHEL to RHEL product.  The stale date has been reset to +6 months.

--- Additional comment from Ani Sinha on 2023-07-31 11:20:56 UTC ---

(In reply to xiachen from comment #23)
> For ipv6_dhcpv6-stateful networks, 
> 
> 1. when using sysconfig render, cloud-init should set:
> 
>   BOOTPROTO=none
>   IPV6_FAILURE_FATAL=yes
> 
> and I tested the scratch build that Emanuele made, it worked but it didn't
> merge. so @Ani, could you make a fix with this solution please?
> 
> > 2) sysconfig on CI 22.1 with comment 7 fix and BOOTPROTO=none, please make
> > sure there is no regression in
> > https://bugzilla.redhat.com/show_bug.cgi?id=1859695 
> 
> 2. while using NM render, based on comment#4, it should set:
> 
> ipv6.method=auto|dhcp      # depending on whether you need to get routes via
> RA
> 
> ipv6.may-fail=no           # so that IPv6 needs to succeed (only useful if
>                            # IPv4 is enabled as well)
> 
> ipv4.method=disabled|auto  # depending on whether you want IPv4 to be
>                            # optionally configured in addition to IPv6
>                            # or not
> I will test the solution in Red HatBZ#2207716 and see if it works for
> ipv6_dhcpv6-stateful only networks without IPv4.
>

@xiachen Please test this scratch build with both sysconfig and NM renderer and report:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=54295231

This is for RHEL 9.3.

Comment 22 errata-xmlrpc 2024-04-30 09:35:54 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/RHBA-2024:2131


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