aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2016-08-11 15:11:38 +0800
committerJiri Pirko <jiri@mellanox.com>2016-08-14 10:16:22 +0200
commit4a9e1fac5d69e6abae0451c579b02f16d960e694 (patch)
tree0bd3a55f22889e998f9865439bbdb0451dbb2f62
parent0641375d10d692e3dacaeec95e36f2525b95881d (diff)
downloadlibteam-4a9e1fac5d69e6abae0451c579b02f16d960e694.tar.gz
teamd: fix the issue that network blocks when systemctl stop teamd
Commit 0641375d10d6 ("teamd: change to Before=network-pre.target in systemd service file") tried to make teamd be stopped after network service is stopped when systemd shutdown. But network service also kills teamd service with "systemctl stop" in ifdown-Team. It means network service try to kill one service that is dependent on network itself, which leads to a block. This patch is to use "systemctl stop --ignore-dependencies" to avoid this block without any side effects. Already verified it on the env where we can reproduce this issue. Fixes: 0641375d10d6 ("teamd: change to Before=network-pre.target in systemd service file") Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
-rwxr-xr-xteamd/redhat/initscripts_systemd/network-scripts/ifdown-Team2
1 files changed, 1 insertions, 1 deletions
diff --git a/teamd/redhat/initscripts_systemd/network-scripts/ifdown-Team b/teamd/redhat/initscripts_systemd/network-scripts/ifdown-Team
index 9404e05..73eccee 100755
--- a/teamd/redhat/initscripts_systemd/network-scripts/ifdown-Team
+++ b/teamd/redhat/initscripts_systemd/network-scripts/ifdown-Team
@@ -45,5 +45,5 @@ if [ -n "${TEAM_CONFIG}" ]; then
is_ignored_file "$device" && continue
/sbin/ifdown ${device##*/}
done
- /usr/bin/systemctl stop teamd@${DEVICE}.service || exit 1
+ /usr/bin/systemctl stop teamd@${DEVICE}.service --ignore-dependencies || exit 1
fi