I experienced problems with dhclient after numerous reboots.
Remote system details -
VERSION="8.6"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.6
Relevant journalctl error detail -
Aug 22 12:03:41 localhost dhclient[634]: DHCPDISCOVER on enp0s3 to 255.255.255.255 port 67 interval 3 (xid=0x2d79ac55)
Aug 22 12:03:41 localhost dhclient[634]: DHCPREQUEST on enp0s3 to 255.255.255.255 port 67 (xid=0x2d79ac55)
Aug 22 12:03:41 localhost dhclient[634]: DHCPOFFER from 1xx.xxx.xx.xxx
Aug 22 12:03:41 localhost dhclient[634]: DHCPACK from 1xx.xxx.xx.xxx (xid=0x2d79ac55)
Aug 22 12:03:43 localhost dhclient[634]: bound to 10.0.0.10 -- renewal in 41261 seconds.
Aug 22 12:03:58 ampere-03 NetworkManager[1541]: <info> [1661169838.1824] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 00-server.conf) (run: 10-dracut-dhclient.conf)
Aug 22 12:03:58 ampere-03 NetworkManager[1541]: <info> [1661169838.9005] dhcp-init: Using DHCP client 'dhclient'
Aug 22 12:04:04 ampere-03 NetworkManager[1541]: <info> [1661169844.8055] dhcp4 (enp0s3): dhclient started with pid 1966
Aug 22 12:04:04 ampere-03 dhclient[1966]: /run/NetworkManager/dhclient-4c448a6a-3179-4f38-ae80-6cc45b6663d2-enp0s3.lease line 12: expecting numeric value.
Aug 22 12:04:04 ampere-03 dhclient[1966]: option classless-static-routes 0,
Aug 22 12:04:04 ampere-03 dhclient[1966]: ^
Aug 22 12:04:04 ampere-03 dhclient[1966]: DHCPREQUEST on enp0s3 to 255.255.255.255 port 67 (xid=0x16697c30)
Aug 22 12:04:04 ampere-03 dhclient[1966]: DHCPACK from 1xx.xxx.xx.xxx (xid=0x16697c30)
Aug 22 12:04:04 ampere-03 dhclient[1966]: bound to 10.0.0.10 -- renewal in 40347 seconds.
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[1995]: set hostname, /etc/hosts, /etc/resolv.conf begin Mon Aug 22 12:04:05 GMT 2022:
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2001]: INFO: Obtained 8.6 from /etc/os-release
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2003]: Mon Aug 22 12:04:05 GMT 2022: Script Reason: NM-controlled system
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2008]: Successfully executed the command curl -H Authorization: Bearer Oracle http://1xx.xxx.xx.xxx/opc/v2/vnics/ -sf
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2010]: Mon Aug 22 12:04:05 GMT 2022: Primary IP obtained: 10.0.0.10
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2015]: Successfully executed the command curl -sf -H Authorization: Bearer Oracle http://1xx.xxx.xx.xxx/opc/v2/instance/
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2016]: new_ip_address=10.0.0.10
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2017]: Updating hostname
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2019]: Running nmcli command: nmcli general hostname ampere-03
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2031]: Pre-existing fqdn is ampere-03.xxxxxxxxxxxxxx.vcnxxxxxxxx.oraclevcn.com and hostname is ampere-03
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2035]: Successfully executed the command ipcalc -h 10.0.0.10
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2036]: fqdn=ampere-03.xxxxxxxxxxxxxx.vcnxxxxxxxx.oraclevcn.com
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2037]: subnet_domain_name=xxxxxxxxxxxxxx.vcnxxxxxxxx.oraclevcn.com
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2038]: vcn_domain_name=vcnxxxxxxxx.oraclevcn.com
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2041]: Line with '10.0.0.10' not found in /etc/hosts
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2042]: Adding '10.0.0.10 ampere-03.xxxxxxxx.xxxxx.oraclevcn.com ampere-03' to /etc/hosts
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2045]: Found line with 'search'
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2048]: Adding 'xxxxxxxxxxxxxx.vcnxxxxxxxx.oraclevcn.com' to line
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2050]: 'vcnxxxxxxxx.oraclevcn.com' already exists in line
Aug 22 12:04:05 ampere-03 oci-dhclient.sh[2051]: sethostname, /etc/hosts, /etc/resolv.conf END
Aug 22 12:04:12 ampere-03 NetworkManager[1541]: <info> [1661169852.4432] config: signal: SIGHUP,config-files,values,values-user,dns-mode (/etc/NetworkManager/NetworkManager.conf (lib: 00-server.conf) (run: 10-dracut-dhclient.conf, 10-oci-dhclient.conf)
Configuration file (Generated by cloud-init or NetworkManager)
# cat /run/NetworkManager/dhclient-86434213-284f-47a9-a35f-3d51d369eb0f-enp0s3.lease
default-duid "\000\004X\234\026\316\227!C\370\225\001\357\356es\314\245";
lease {
interface "enp0s3";
fixed-address 10.0.0.10;
option subnet-mask 255.255.255.0;
option dhcp-lease-time 86400;
option routers 10.0.0.1;
option dhcp-message-type 5;
option domain-name-servers xxx.xxx.xxx.xxx;
option dhcp-server-identifier xxx.xxx.xxx.xxx;
option interface-mtu 9000;
option domain-name "vcnxxxxxxxx.oraclevcn.com";
renew 1 2022/08/22 22:52:56;
rebind 2 2022/08/23 10:04:36;
expire 2 2022/08/23 13:04:36;
}
lease {
interface "enp0s3";
fixed-address 10.0.0.10;
option subnet-mask 255.255.255.0;
option routers 10.0.0.1;
option dhcp-lease-time 86400;
option dhcp-message-type 5;
option dhcp-server-identifier xxx.xxx.xxx.xxx;
option domain-name-servers xxx.xxx.xxx.xxx;
option interface-mtu 9000;
option rfc3442-classless-static-routes 0,10,0,0,1,16,169,254,0,0,0,0;
option domain-name "vcnxxxxxxxx.oraclevcn.com";
renew 1 2022/08/22 22:38:51;
rebind 2 2022/08/23 10:05:01;
expire 2 2022/08/23 13:05:01;
}
# grep -v "#" /var/lib/NetworkManager/dhclient-enp0s3.conf
send dhcp-client-identifier = hardware;
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
option ms-classless-static-routes code 249 = array of unsigned integer 8;
option wpad code 252 = string;
also request rfc3442-classless-static-routes;
also request ms-classless-static-routes;
also request static-routes;
also request wpad;
also request ntp-servers;
also request root-path;
I don't have a lot of NetworkManager experience. Over the course of a few days, I set up services on this platform without rebooting the instance. I prefer systemd-networkd or network-scripts, but I'm not sure about switching to systemd-networkd at this point. Every reboot brings this error, but everything else continues to function normally. Please help.
I populated /etc/dhcp/dhclient.conf with the missing configuration options since one of the configuration section comments suggested it.
send dhcp-client-identifier = hardware;
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
option ms-classless-static-routes code 249 = array of unsigned integer 8;
option wpad code 252 = string;
also request rfc3442-classless-static-routes;
also request ms-classless-static-routes;
also request static-routes;
also request wpad;
also request ntp-servers;
also request root-path;
This stuff is driving me crazy, I've checked all cloud-init scripts, there are mentions of rfc3442 but they don't have any documentation detailing the implementation.
is it okay to disable & mask cloud-init & NetworkManager? Please help me fix this.