In #15080, there was a command added to re-add 127.0.0.1/8 to the lo interface when the networking configuration is being brought down. However, the trigger for that command is `down`, which, looking at ifupdown2 configuration files, runs immediately after 127.0.0.1/16 is removed. This means there may be a period of time where there are no loopback addresses assigned to the lo interface, and redis commands will fail. Fix this by changing this to pre-down, which should run well before 127.0.0.1/16 is removed, and should always leave lo with a loopback address. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
27 lines
535 B
Plaintext
27 lines
535 B
Plaintext
#
|
|
# =============== Managed by SONiC Config Engine DO NOT EDIT! ===============
|
|
# generated from /usr/share/sonic/templates/interfaces.j2 using sonic-cfggen
|
|
# file: /etc/network/interfaces
|
|
#
|
|
# The loopback network interface
|
|
auto lo
|
|
iface lo inet loopback
|
|
address 127.0.0.1
|
|
netmask 255.255.0.0
|
|
scope host
|
|
post-up ip addr del 127.0.0.1/8 dev lo
|
|
pre-down ip addr add 127.0.0.1/8 dev lo
|
|
|
|
# The management network interface
|
|
auto eth0
|
|
|
|
|
|
# ZTP out-of-band interface
|
|
allow-hotplug eth0
|
|
|
|
|
|
#
|
|
source /etc/network/interfaces.d/*
|
|
#
|
|
|