iSCSI root with multiple NICs fails ifdown -a
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 14.04.4 LTS
ifupdown version 0.7.47.2ubuntu4.4
In /etc/init/
The correct behavior would seem to be to detect which interface is being used for the iSCSI mount, and exclude just that interface from the "ifdown" command just after the event emission.
I.e. if the iSCSI volume is using eth2, then the ifdown command should be called as "ifdown -a --exclude=lo0 --exclude=eth2"
Appropriate code might be:
<BEGIN /etc/init/
# networking - configure virtual network devices
#
# This task causes virtual network devices that do not have an associated
# kernel object to be started on boot.
description "configure virtual network devices"
emits static-network-up
emits net-device-up
emits deconfiguring-
start on (local-filesystems
and (stopped udevtrigger or container)) or runlevel [2345] or stopped networking RESULT=failed PROCESS=post-stop EXIT_STATUS=100
stop on unmounted-
pre-start script
if [ "$UPSTART_EVENTS" = "stopped" ] && [ "$UPSTART_JOB" = "networking" ] && [ "$EXIT_STATUS" = "100" ]; then
exit 0
fi
mkdir -p /run/network
ifup -a
end script
post-stop script
if [ -z "$UPSTART_
echo "Stopping or restarting the networking job is not supported."
echo "Use ifdown & ifup to reconfigure desired interface."
exit 100
fi
log_
echo $*
}
# These checks were taken from the Debian ifupdown.
check_
[ -e /proc/mounts ] || return 0
if [ -e /etc/iscsi/
if [ -e /dev/.initramfs
then
else
fi
exit 0
fi
while read DEV MTPT FSTYPE REST; do
case $DEV in
;;
esac
case $FSTYPE in
;;
esac
done < /proc/mounts
}
check_
[ -e /proc/swaps ] || return 0
while read DEV MTPT FSTYPE REST; do
case $DEV in
;;
esac
done < /proc/swaps
}
<END>
check_
check_
# Anything that manages network interfaces *MUST* wait for this event
initctl emit deconfiguring-
ifdown -a --exclude=lo ${EXCLUDE}
end script