Skip to content

Commit

Permalink
kill ovn-controller/ovsdb-server/ovs-vswitchd manully
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed May 21, 2024
1 parent c47c27d commit 744c3b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/images/start-ovs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function cgroup_match {
}

function quit {
set -x
gen_name=$(kubectl -n "${POD_NAMESPACE}" get pod "${POD_NAME}" -o jsonpath='{.metadata.generateName}')
revision_hash=$(kubectl -n "${POD_NAMESPACE}" get pod "${POD_NAME}" -o jsonpath='{.metadata.labels.controller-revision-hash}')
revision=$(kubectl -n "${POD_NAMESPACE}" get controllerrevision "${gen_name}${revision_hash}" --ignore-not-found -o jsonpath='{.revision}')
Expand All @@ -74,6 +75,11 @@ function quit {
if cgroup_match "${pid}" self; then
/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop
fi
# kill ovn-controller/ovsdb-server/ovs-vswitchd manully on cleanup/uninstallation
for pid in `pidof -c monitor`; do
pkill -P $pid
kill $pid
done
fi
exit 0
Expand Down

0 comments on commit 744c3b2

Please sign in to comment.