From af907fd9603addae47179b9abd8904479da5f0ad Mon Sep 17 00:00:00 2001 From: Charles Short Date: Mon, 18 Jul 2022 10:27:20 -0400 Subject: [PATCH] debian: Remove sleep in network interface pre-up Remove the 20 second delay before bringing up the network interface. This was done so that the network interface has feature parity with Centos 7, but ifupdown detects nelink differently compared to Centos 7. Removing the delay results in a significant speed up. In Debian, the network cable test is run by /etc/network/if-up.d/00check-network-cable script. Story: 2009221 Task: 45758 Test Plan PASS Build platform-kickstarts package PASS Build ISO PASS Run bootstap/unlock PASS Check /etc/network/interface.d/ifcfg-* if 'sleep 20' is still present. Signed-off-by: Charles Short Change-Id: I0d7a6387cb42a0cb1af62fa49d6790b641c78b75 --- kickstart/files/kickstart.cfg | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index e9dd425e..a730a25b 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -1812,25 +1812,6 @@ if [ ! -d "/etc/network/interfaces.d" ] ; then mkdir -p -m 0775 /etc/network/interfaces.d fi -# Build networking scripts, starting with the localhost interface -cat << EOF >> /etc/network/interfaces - -# The loopback network interface -auto lo -iface lo inet loopback -EOF - -if [ $mgmt_dev != "lo" ]; then -cat << EOF >> /etc/network/interfaces - -# management network interface -allow-hotplug $mgmt_dev -auto $mgmt_dev -iface $mgmt_dev inet dhcp - -EOF -fi - ilog "Setup network scripts" if [ $mgmt_vlan -eq 0 ] ; then @@ -1842,19 +1823,16 @@ if [ $mgmt_vlan -eq 0 ] ; then # Build networking scripts cat << EOF > /etc/network/interfaces.d/ifcfg-lo auto lo -iface lo inet static -address 127.0.0.1 -netmask 255.0.0.0 - post-up echo 0 > /proc/sys/net/ipv6/conf/lo/autoconf; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_ra; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_redirects +iface lo inet loopback EOF - +if [ $mgmt_dev != "lo" ]; then cat << EOF > /etc/network/interfaces.d/ifcfg-$mgmt_dev auto $mgmt_dev iface $mgmt_dev inet dhcp - pre-up sleep 20 post-up echo 0 > /proc/sys/net/ipv6/conf/lo/autoconf; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_ra; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_redirects EOF +fi else @@ -1889,7 +1867,6 @@ EOF cat << EOF > /etc/network/interfaces.d/ifcfg-$mgmt_dev auto $mgmt_dev iface $mgmt_dev $mgmt_address_family manual - pre-up sleep 20 post-up echo 0 > /proc/sys/net/ipv6/conf/lo/autoconf; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_ra; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_redirects EOF @@ -1897,7 +1874,6 @@ EOF auto vlan$mgmt_vlan iface vlan$mgmt_vlan $mgmt_address_family dhcp vlan-raw-device $mgmt_dev - pre-up sleep 20 post-up echo 0 > /proc/sys/net/ipv6/conf/lo/autoconf; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_ra; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_redirects EOF fi