Skip to content

Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL#685

Merged
smoser merged 3 commits into
canonical:masterfrom
otubo:1859695
Dec 1, 2020
Merged

Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL#685
smoser merged 3 commits into
canonical:masterfrom
otubo:1859695

Conversation

@otubo
Copy link
Copy Markdown
Contributor

@otubo otubo commented Nov 24, 2020

Proposed Commit Message

Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL

BOOTPROTO needs to be set to 'dhcp' on RHEL so NetworkManager can
properly acquire ipv6 address.

rhbz: #1859695

Signed-off-by: Eduardo Otubo otubo@redhat.com

Additional Context

The original bz 1859695 is mostly marked as private but the bug as noticed while configuring an internal IPv6 network on Openstack between the instance and an NFS storage. No patch required or bug noticed if the instance was configured with a regular ipv6/dhcp interface.

Test Steps

(as described on the above mentioned BZ)
Steps to Reproduce:

  1. Create StorageNFS network with IPv6 CIDR and address range defined
  2. Create a Nova instance with 2 NICs, 2nd NIC connected to StorageNFS network
  3. Login to VM and examin Eth1 IP address

Actual results:
The Nova assigned IPv6 address was not assigned to device Eth1

Expected results:
Expected the Nova assigned IP address to be assigned to Eth1 interface

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

BOOTPROTO needs to be set to 'dhcp' on RHEL so NetworkManager can
properly acquire ipv6 address.

rhbz: #1859695

Signed-off-by: Eduardo Otubo <otubo@redhat.com>
Copy link
Copy Markdown
Collaborator

@OddBloke OddBloke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@smoser smoser merged commit f550c87 into canonical:master Dec 1, 2020
ani-sinha added a commit to ani-sinha/cloud-init that referenced this pull request Aug 10, 2023
When network type is ipv6_dhcpv6-stateful, cloud-init seems to enable dhcp for
both ipv4 and ipv6. Network manager prefers dhcp over ipv4 and hence dhcp6 is
not used to obtain the IP address. This is incorrect. For ipv6_dhcpv6-stateful
networks, we should set:

ipv4.method = disabled // disables all ipv4 dhcp
ipv6.method = dhcp
ipv6.may-fail = no // dhcp6 must succeed.

For ifcfg files (sysconfig renderer), the corresponding changes should be:

BOOTPROTO = none // instead of dhcp so that dhcp4 is disabled.
IPV6_FAILURE_FATAL = yes // so that dhcp6 should succeed.

This patch fixes this. This patch has been tested by Red Hat QE and it seems
to fix the above issue.

RHBZ: 2227767
fixes: f550c87 ("Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL (canonical#685)")

Signed-off-by: Ani Sinha <anisinha@redhat.com>
ani-sinha added a commit to ani-sinha/cloud-init that referenced this pull request Aug 29, 2023
When network type is ipv6_dhcpv6-stateful/stateless/slaac, cloud-init seems to
enable dhcp for both ipv4 and ipv6. Network manager prefers dhcp over ipv4 and
hence dhcp6 is not used to obtain the IP address. This is incorrect.
For ipv6_dhcpv6-stateful/stateless/slaac networks, we should set:

ipv4.method = disabled // disables all ipv4 dhcp
ipv6.method = dhcp
ipv6.may-fail = no // dhcp6 must succeed.

For ifcfg files (sysconfig renderer), the corresponding changes should be:

BOOTPROTO = none // instead of dhcp so that dhcp4 is disabled.
IPV6_FAILURE_FATAL = yes // so that dhcp6 should succeed.

This patch fixes this for rhel. The patch has been tested by Red Hat QE.

RHBZ: 2046491
fixes: f550c87 ("Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL (canonical#685)")

Signed-off-by: Ani Sinha <anisinha@redhat.com>
ani-sinha added a commit to ani-sinha/cloud-init that referenced this pull request Aug 29, 2023
When network type is ipv6_dhcpv6-stateful/stateless/slaac, cloud-init seems to
enable dhcp for both ipv4 and ipv6. Network manager prefers dhcp over ipv4 and
hence dhcp6 is not used to obtain the IP address. This is incorrect.
For only ipv6_dhcpv6-stateful/stateless/slaac networks, we should set:

ipv4.method = disabled // disables all ipv4 dhcp

For ifcfg files (sysconfig renderer), the corresponding changes should be:
BOOTPROTO = none // instead of dhcp so that dhcp4 is disabled.

Additionally, for only ipv6_dhcpv6_stateful, we should set:
ipv6.may-fail = no // dhcp6 must succeed.

which translates to the following ifcfg setting:
IPV6_FAILURE_FATAL = yes // so that dhcp6 should succeed.

This patch fixes this for rhel. The patch has been tested by Red Hat QE.

RHBZ: 2046491
fixes: f550c87 ("Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL (canonical#685)")

Signed-off-by: Ani Sinha <anisinha@redhat.com>
ani-sinha added a commit to ani-sinha/cloud-init that referenced this pull request Sep 2, 2023
When network type is ipv6_dhcpv6-stateful/stateless/slaac, cloud-init seems to
enable dhcp for both ipv4 and ipv6. Network manager prefers dhcp over ipv4 and
hence dhcp6 is not used to obtain the IP address. This is incorrect.
For only ipv6_dhcpv6-stateful/stateless/slaac networks, we should set:

ipv4.method = disabled // disables all ipv4 dhcp

For ifcfg files (sysconfig renderer), the corresponding changes should be:
BOOTPROTO = none // instead of dhcp so that dhcp4 is disabled.

Additionally, for only ipv6_dhcpv6_stateful, we should set:
ipv6.may-fail = no // dhcp6 must succeed.

which translates to the following ifcfg setting:
IPV6_FAILURE_FATAL = yes // so that dhcp6 should succeed.

This patch fixes this for rhel. The patch has been tested by Red Hat QE.

RHBZ: 2046491
fixes: f550c87 ("Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL (canonical#685)")

Signed-off-by: Ani Sinha <anisinha@redhat.com>
TheRealFalcon pushed a commit that referenced this pull request Sep 6, 2023
…4395)

When network type is ipv6_dhcpv6-stateful/stateless/slaac, cloud-init seems to
enable dhcp for both ipv4 and ipv6. Network manager prefers dhcp over ipv4 and
hence dhcp6 is not used to obtain the IP address. This is incorrect.
For only ipv6_dhcpv6-stateful/stateless/slaac networks, we should set:

ipv4.method = disabled // disables all ipv4 dhcp

For ifcfg files (sysconfig renderer), the corresponding changes should be:
BOOTPROTO = none // instead of dhcp so that dhcp4 is disabled.

Additionally, for only ipv6_dhcpv6_stateful, we should set:
ipv6.may-fail = no // dhcp6 must succeed.

which translates to the following ifcfg setting:
IPV6_FAILURE_FATAL = yes // so that dhcp6 should succeed.

This patch fixes this for rhel. The patch has been tested by Red Hat QE.

RHBZ: 2046491
fixes: f550c87 ("Adding BOOTPROTO = dhcp to render sysconfig dhcp6 stateful on RHEL (#685)")

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants