It was detected the networking.service is marked as failing after reboot, but the network config is installed on the kernel
The package ifupdown has some auxiliary directories (if-up.d, if-pre-up.d, etc...) where other packages can add scripts to be executed during network bring up.
In our case these ones:
ifupdown-extra
nss-pam-ldapd
vlan
ifenslave
When the command "ifup -a" is executed by the service, it starts to run the scripts for each interface in /etc/network/interfaces.d/ and finally executes with the argument "$IFACE = all". But several scripts in ifupdown-extra are not prepared to handle "-all" and finish with error
For this case my proposal is to add to this scripts:
// code placeholder
diff --git a/if-up-scripts/check-duplicate-ip b/if-up-scripts/check-duplicate-ip
index a07668d..9d38217 100755
--- a/if-up-scripts/check-duplicate-ip
+++ b/if-up-scripts/check-duplicate-ip
@@ -103,6 +103,11 @@ if [ -z "$IFACE" ] ; then
exit 0
fi
+if [ "$IFACE" == "--all" ] ; then
+ # this script only handles one interface per run
+ exit 0
+fi
+
# If the interface is a serial (sl), WAN interfaces (ww) or localhost (lo) then skip the test
# as it does not make sense in these
case $IFACE in
@@ -135,8 +140,6 @@ else
fi
ARP_COUNT=${ARP_COUNT:-2}
-
-
[ -z "$IF_ADDRESS" ] && find_ip
# Still no IP? Bail out
if [ -z "$IF_ADDRESS" ] ; then
diff --git a/if-up-scripts/check-duplicate-ip6 b/if-up-scripts/check-duplicate-ip6
index f48cdd3..1b57a59 100755
--- a/if-up-scripts/check-duplicate-ip6
+++ b/if-up-scripts/check-duplicate-ip6
@@ -105,6 +105,11 @@ if [ -z "$IFACE" ] ; then
exit 1
fi
+if [ "$IFACE" == "--all" ] ; then
+ # this script only handles one interface per run
+ exit 0
+fi
+
# If the interface is a serial (sl), WAN interfaces (ww) or localhost (lo) then skip the test
# as it does not make sense in these
case $IFACE in
diff --git a/if-up-scripts/check-gateway b/if-up-scripts/check-gateway
index b3fdeb6..e9671ca 100755
--- a/if-up-scripts/check-gateway
+++ b/if-up-scripts/check-gateway
@@ -55,6 +55,11 @@ VERBOSITY=${VERBOSITY:-0}
# Break out if we don't have an interface to work with
[ -z "$IFACE" ] && exit 0
+if [ "$IFACE" == "--all" ] ; then
+ # this script only handles one interface per run
+ exit 0
+fi
+
if [ "$DO_SYSLOG" = "yes" ] ; then
OUTPUT="logger -i -p daemon.err -s"
else
diff --git a/if-up-scripts/check-network-cable b/if-up-scripts/check-network-cable
index 94279eb..5a85738 100755
--- a/if-up-scripts/check-network-cable
+++ b/if-up-scripts/check-network-cable
@@ -172,6 +172,11 @@ check_bond_status() {
exit 1
}
+if [ "$IFACE" == "--all" ] ; then
+ # this script only handles one interface per run
+ exit 0
+fi
+
# Check our IFACE name, run the status check depending on the type of interface
case $IFACE in
en* | eth*)
In the case of nss-pam-ldapd (that contain nslcd package) the script /etc/network/if-up.d/nslcd is failing when there are loopback interfaces with label (lo:X) as the script only tests the interface "lo" to exit with 0, when it should also exit for "lo:X"
This config is common on AIO-SX installations.
And one last error is on the hiera file, if we are configuring interface (like mgmt) on the loopback, we are generating 2 identical entries (lo and lo:1) that make the ifup command to configure twice the same addresses and return an error.
Severity
Provide the severity of the defect.
<Minor: System/Feature is usable with minor issue>
Steps to Reproduce
With the following config (VBox with AIO-SX, IPv4):
source /etc/platform/openrc
system host-if-modify controller-0 enp0s3 -c platform -n oam0
system interface-network-assign controller-0 oam0 oam
system ntp-modify ntpservers=0.pool.ntp.org,1.pool.ntp.org
system storage-backend-add ceph --confirmed
system host-disk-list controller-0
system host-disk-list controller-0 | awk '/\/dev\/sdb/{print $2}' | xargs -i system host-stor-add controller-0 {}
system host-stor-list controller-0
system host-if-modify 1 enp0s9 -n test1 -c data --ipv4-mode static
system host-addr-add 1 test1 11.0.0.1 24
system host-route-add 1 test1 11.11.11.0 24 11.0.0.254 11
system host-route-add 1 test1 11.12.11.0 24 11.0.0.254 22
system host-route-add 1 test1 11.13.11.0 24 11.0.0.254 33
system host-route-add 1 test1 11.44.44.0 24 11.0.0.254 44system host-unlock 1
Expected Behavior
After return service should not be failing
Actual Behavior
Service is in failed
root@controller-0:/var/home/sysadmin# systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2022-06-08 09:28:52 UTC; 1 day 5h ago
Docs: man:interfaces(5)
Main PID: 755 (code=exited, status=1/FAILURE)
CPU: 553ms
Brief Description
It was detected the networking.service is marked as failing after reboot, but the network config is installed on the kernel
The package ifupdown has some auxiliary directories (if-up.d, if-pre-up.d, etc...) where other packages can add scripts to be executed during network bring up.
In our case these ones:
ifupdown-extra
nss-pam-ldapd
vlan
ifenslave
When the command "ifup -a" is executed by the service, it starts to run the scripts for each interface in /etc/network/ interfaces. d/ and finally executes with the argument "$IFACE = all". But several scripts in ifupdown-extra are not prepared to handle "-all" and finish with error
For this case my proposal is to add to this scripts:
// code placeholder scripts/ check-duplicate -ip b/if-up- scripts/ check-duplicate -ip scripts/ check-duplicate -ip scripts/ check-duplicate -ip
diff --git a/if-up-
index a07668d..9d38217 100755
--- a/if-up-
+++ b/if-up-
@@ -103,6 +103,11 @@ if [ -z "$IFACE" ] ; then
exit 0
fi
+if [ "$IFACE" == "--all" ] ; then ${ARP_COUNT: -2}
+ # this script only handles one interface per run
+ exit 0
+fi
+
# If the interface is a serial (sl), WAN interfaces (ww) or localhost (lo) then skip the test
# as it does not make sense in these
case $IFACE in
@@ -135,8 +140,6 @@ else
fi
ARP_COUNT=
- scripts/ check-duplicate -ip6 b/if-up- scripts/ check-duplicate -ip6 scripts/ check-duplicate -ip6 scripts/ check-duplicate -ip6
-
[ -z "$IF_ADDRESS" ] && find_ip
# Still no IP? Bail out
if [ -z "$IF_ADDRESS" ] ; then
diff --git a/if-up-
index f48cdd3..1b57a59 100755
--- a/if-up-
+++ b/if-up-
@@ -105,6 +105,11 @@ if [ -z "$IFACE" ] ; then
exit 1
fi
+if [ "$IFACE" == "--all" ] ; then scripts/ check-gateway b/if-up- scripts/ check-gateway scripts/ check-gateway scripts/ check-gateway ${VERBOSITY: -0}
+ # this script only handles one interface per run
+ exit 0
+fi
+
# If the interface is a serial (sl), WAN interfaces (ww) or localhost (lo) then skip the test
# as it does not make sense in these
case $IFACE in
diff --git a/if-up-
index b3fdeb6..e9671ca 100755
--- a/if-up-
+++ b/if-up-
@@ -55,6 +55,11 @@ VERBOSITY=
# Break out if we don't have an interface to work with
[ -z "$IFACE" ] && exit 0
+if [ "$IFACE" == "--all" ] ; then scripts/ check-network- cable b/if-up- scripts/ check-network- cable scripts/ check-network- cable scripts/ check-network- cable
+ # this script only handles one interface per run
+ exit 0
+fi
+
if [ "$DO_SYSLOG" = "yes" ] ; then
OUTPUT="logger -i -p daemon.err -s"
else
diff --git a/if-up-
index 94279eb..5a85738 100755
--- a/if-up-
+++ b/if-up-
@@ -172,6 +172,11 @@ check_bond_status() {
exit 1
}
+if [ "$IFACE" == "--all" ] ; then
+ # this script only handles one interface per run
+ exit 0
+fi
+
# Check our IFACE name, run the status check depending on the type of interface
case $IFACE in
en* | eth*)
In the case of nss-pam-ldapd (that contain nslcd package) the script /etc/network/ if-up.d/ nslcd is failing when there are loopback interfaces with label (lo:X) as the script only tests the interface "lo" to exit with 0, when it should also exit for "lo:X"
This config is common on AIO-SX installations.
And one last error is on the hiera file, if we are configuring interface (like mgmt) on the loopback, we are generating 2 identical entries (lo and lo:1) that make the ifup command to configure twice the same addresses and return an error.
Severity
Provide the severity of the defect.
<Minor: System/Feature is usable with minor issue>
Steps to Reproduce
With the following config (VBox with AIO-SX, IPv4):
source /etc/platform/ openrc network- assign controller-0 oam0 oam 0.pool. ntp.org, 1.pool. ntp.org
system host-if-modify controller-0 enp0s3 -c platform -n oam0
system interface-
system ntp-modify ntpservers=
system storage-backend-add ceph --confirmed
system host-disk-list controller-0
system host-disk-list controller-0 | awk '/\/dev\/sdb/{print $2}' | xargs -i system host-stor-add controller-0 {}
system host-stor-list controller-0
system host-if-modify 1 enp0s9 -n test1 -c data --ipv4-mode static
system host-addr-add 1 test1 11.0.0.1 24
system host-route-add 1 test1 11.11.11.0 24 11.0.0.254 11
system host-route-add 1 test1 11.12.11.0 24 11.0.0.254 22
system host-route-add 1 test1 11.13.11.0 24 11.0.0.254 33
system host-route-add 1 test1 11.44.44.0 24 11.0.0.254 44system host-unlock 1
Expected Behavior
After return service should not be failing
Actual Behavior
Service is in failed
root@controller -0:/var/ home/sysadmin# systemctl status networking.service system/ networking. service; enabled; vendor preset: disabled)
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Wed 2022-06-08 09:28:52 UTC; 1 day 5h ago
Docs: man:interfaces(5)
Main PID: 755 (code=exited, status=1/FAILURE)
CPU: 553ms
Reproducibility
Reproducible
System Configuration
VBox, AIO-SX, IPv4
Load info (eg: 2022-03- 10_20-00- 07)
SW_VERSION="22.06" "2022-06- 06_19-00- 02"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID=
SRC_BUILD_ID="269"
Last Pass
Never tested
Test Activity
Developer Testing
Workaround
none