Debian Networking: networking.service is marked as failed after reboot, but network config is correct
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Fabiano Correa Mercer |
Bug Description
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/
For this case my proposal is to add to this scripts:
// code placeholder
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
+ # 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=
-
-
[ -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
+ # 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
+ # 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/
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/
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
● 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-
BUILD_ID=
Last Pass
Never tested
Test Activity
Developer Testing
Workaround
none
Changed in starlingx: | |
assignee: | nobody → Fabiano Correa Mercer (fcorream) |
Changed in starlingx: | |
importance: | Undecided → Medium |
tags: | added: stx.8.0 stx.debian stx.networking |
description: | updated |
Fix proposed to branch: master /review. opendev. org/c/starlingx /tools/ +/852279
Review: https:/