Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Install openstack
2. Create a subnet with:
ipv6_address_mode -c ipv6_ra_mode
+-------------------+------------------+
| Field | Value |
+-------------------+------------------+
| ipv6_address_mode | dhcpv6-stateless |
| ipv6_ra_mode | dhcpv6-stateless |
+-------------------+------------------+
3. Deploy an instance
Actual results:
File: openstack/latest/network_data.json
----------------------------------------
{
"services": [
{
"type": "dns",
"address": "fd12:3456:789a:1::1"
}
],
"networks": [
{
"network_id": "cf79eea0-6196-45a0-b9f8-ff9dd95eaab3",
"type": "ipv6_dhcpv6-stateless",
"services": [
{
"type": "dns",
"address": "fd12:3456:789a:1::1"
}
],
"netmask": "ffff:ffff:ffff:ffff::",
"link": "tap5910c6cc-2d",
"routes": [
{
"netmask": "::",
"network": "::",
"gateway": "fd12:3456:789a:1::fffe"
}
],
"ip_address": "fd12:3456:789a:1:f816:3eff:fee2:3aa3",
"id": "network0"
}
],
"links": [
{
"vif_id": "5910c6cc-2d6e-4a44-bf05-2accdefd0316",
"type": "phy",
"ethernet_mac_address": "fa:16:3e:73:0d:96",
"id": "tap5910c6cc-2d",
"mtu": 1450
}
]
}
The network config forces the client to try dhcpv6, not stateless e.g slaac. This fails when there is no DHCPv6 configured, or DHCPv6 is only configured to provide advanced options such a bootfile-url etc.
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
DHCPV6C=yes
HWADDR=fa:16:3e:73:0d:96
IPV6INIT=yes
IPV6_DEFAULTGW=fd12:3456:789a:1::fffe
MTU=1450
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Expected results:
The configuration written should differentiate between dhcp6-stateful and dhcp6-stateless.
For dhcp6-stateless "DHCPV6C=yes" should be replaced by IPV6_AUTOCONF=yes as shown in the example below.
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
IPV6_AUTOCONF=yes
HWADDR=fa:16:3e:73:0d:96
IPV6INIT=yes
IPV6_DEFAULTGW=fd12:3456:789a:1::fffe
MTU=1450
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Additional info:
The issue starts is in the following code[1]:
if 'dhcp' in network['type']:
t = 'dhcp6' if network['type'].startswith('ipv6') else 'dhcp4'
subnet.update({
'type': t,
})
This makes the assumption that 'ipv6_dhcpv6-stateless' and 'ipv6_dhcpv6-stateful' can be treated the same.
Then in the code[2] the subnet type is checked and DHCPV6C is always used.
if subnet_type == 'dhcp6':
# TODO need to set BOOTPROTO to dhcp6 on SUSE
iface_cfg['IPV6INIT'] = True
iface_cfg['DHCPV6C'] = True
Grepping the source code it looks like this is only affecting cloudinit/net/sysconfig.py.
[1] https://git.launchpad.net/cloud-init/tree/cloudinit/sources/helpers/openstack.py#n587
[2] https://git.launchpad.net/cloud-init/tree/cloudinit/net/sysconfig.py#n346
Description of problem:
cloud-init writed incorrect configuration for dhcp6-stateless subnets.
Version-Release number of selected component (if applicable):
cloud-init-18.5-3.el7.centos.x86_64
How reproducible:
100%
Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Install openstack 2. Create a subnet with: ipv6_address_mode -c ipv6_ra_mode +-------------------+------------------+ | Field | Value | +-------------------+------------------+ | ipv6_address_mode | dhcpv6-stateless | | ipv6_ra_mode | dhcpv6-stateless | +-------------------+------------------+ 3. Deploy an instance Actual results: File: openstack/latest/network_data.json ---------------------------------------- { "services": [ { "type": "dns", "address": "fd12:3456:789a:1::1" } ], "networks": [ { "network_id": "cf79eea0-6196-45a0-b9f8-ff9dd95eaab3", "type": "ipv6_dhcpv6-stateless", "services": [ { "type": "dns", "address": "fd12:3456:789a:1::1" } ], "netmask": "ffff:ffff:ffff:ffff::", "link": "tap5910c6cc-2d", "routes": [ { "netmask": "::", "network": "::", "gateway": "fd12:3456:789a:1::fffe" } ], "ip_address": "fd12:3456:789a:1:f816:3eff:fee2:3aa3", "id": "network0" } ], "links": [ { "vif_id": "5910c6cc-2d6e-4a44-bf05-2accdefd0316", "type": "phy", "ethernet_mac_address": "fa:16:3e:73:0d:96", "id": "tap5910c6cc-2d", "mtu": 1450 } ] } The network config forces the client to try dhcpv6, not stateless e.g slaac. This fails when there is no DHCPv6 configured, or DHCPv6 is only configured to provide advanced options such a bootfile-url etc. # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=none DEFROUTE=yes DEVICE=eth0 DHCPV6C=yes HWADDR=fa:16:3e:73:0d:96 IPV6INIT=yes IPV6_DEFAULTGW=fd12:3456:789a:1::fffe MTU=1450 ONBOOT=yes TYPE=Ethernet USERCTL=no Expected results: The configuration written should differentiate between dhcp6-stateful and dhcp6-stateless. For dhcp6-stateless "DHCPV6C=yes" should be replaced by IPV6_AUTOCONF=yes as shown in the example below. # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=none DEFROUTE=yes DEVICE=eth0 IPV6_AUTOCONF=yes HWADDR=fa:16:3e:73:0d:96 IPV6INIT=yes IPV6_DEFAULTGW=fd12:3456:789a:1::fffe MTU=1450 ONBOOT=yes TYPE=Ethernet USERCTL=no Additional info: The issue starts is in the following code[1]: if 'dhcp' in network['type']: t = 'dhcp6' if network['type'].startswith('ipv6') else 'dhcp4' subnet.update({ 'type': t, }) This makes the assumption that 'ipv6_dhcpv6-stateless' and 'ipv6_dhcpv6-stateful' can be treated the same. Then in the code[2] the subnet type is checked and DHCPV6C is always used. if subnet_type == 'dhcp6': # TODO need to set BOOTPROTO to dhcp6 on SUSE iface_cfg['IPV6INIT'] = True iface_cfg['DHCPV6C'] = True Grepping the source code it looks like this is only affecting cloudinit/net/sysconfig.py. [1] https://git.launchpad.net/cloud-init/tree/cloudinit/sources/helpers/openstack.py#n587 [2] https://git.launchpad.net/cloud-init/tree/cloudinit/net/sysconfig.py#n346