Use internal dhcp client for centos 9-stream and beyond

All indication in CI is that Centos Stream9's use of dhclient
appears to point to compatability issues when interacting with
dnsmasq. However, this doesn't appear to be the issue with the
internal dhcp client. As such, lets constraint the RH default
so that it no longer applies to Centos 9-stream.

I've also added a documentation entry for DIB_DHCP_CLIENT which
was previously undocumented.

As an aside, I've already reached out to RH's NetworkManager team
regarding this, but root cause is not entirely understood at this
point.

Change-Id: I235f75b385a8b0348c8fe064038c51409f8722c4
Story: 2010109
Task: 45677
This commit is contained in:
Julia Kreger 2022-06-28 11:02:03 -07:00
parent cdf931d190
commit 5f01bd5d61
2 changed files with 24 additions and 5 deletions

View File

@ -39,3 +39,13 @@ DIB_DHCP_NETWORK_MANAGER_AUTO
auto-configure any interface with no configuration, it will use DHCP for auto-configure any interface with no configuration, it will use DHCP for
IPv4 and Router Advertisements to decide how to initialize IPv6. IPv4 and Router Advertisements to decide how to initialize IPv6.
:Example: DIB_DHCP_NETWORK_MANAGER_AUTO=true :Example: DIB_DHCP_NETWORK_MANAGER_AUTO=true
DIB_DHCP_CLIENT
:Required: no
:Default: internal
:Description: When NetworkManager is in use, this setting conveys which DHCP
client is in use for acquiring a DHCP address for the node. In some specific
cases, where known that dhclient is the tested or most compatible default,
specifically for Centos 7, 8, and 8-Stream, as well as derived distributions.
Otherwise, the "internal" dhcp client is the default.
:Example: DIB_DHCP_CLIENT

View File

@ -9,12 +9,21 @@ set -o pipefail
SCRIPTDIR=$(dirname $0) SCRIPTDIR=$(dirname $0)
if [ -e "/etc/redhat-release" ]; then if [ -e "/etc/redhat-release" ]; then
# NOTE(TheJulia): While the internal client which every networkmanager user # NOTE(TheJulia): RHEL, prior to RHEL8 used dhclient by default launched
# should have is internal, dhclient has better behavior which includes # by NetworkManager. In RHEL8, this default switched to the "internal"
# shutting down the port between retries which is critical for recovery # dhcp client.
# from LACP port blocking situations. As such, we'll force it to dhclient. # This is problematic in RHEL8, with port blocking situations as dhclient
# has better behavior which includes shutting down the port between
# retries which is critical for recovery from LACP port blocking
# situations. As such, we'll force it to dhclient.
# For more information, see https://storyboard.openstack.org/#!/story/2008001 # For more information, see https://storyboard.openstack.org/#!/story/2008001
DIB_DHCP_CLIENT=${DIB_DHCP_CLIENT:-dhclient} if [[ '7' =~ ${DIB_RELEASE} ]]; then
DIB_DHCP_CLIENT=${DIB_DHCP_CLIENT:-dhclient}
elif [[ '8' =~ ${DIB_RELEASE} ]]; then
DIB_DHCP_CLIENT=${DIB_DHCP_CLIENT:-dhclient}
fi
# NOTE(TheJulia): Centos 9-stream/RHEL9, appear to need to leverage the
# internal interface. See: https://storyboard.openstack.org/#!/story/2010109
fi fi