stop ovs that installed from git on unstack

Change-Id: I6a30ca3e371787d147785944de61746c3cdd6046
This commit is contained in:
Moshe Levi 2017-07-09 15:48:24 +03:00
parent 7ced607e54
commit 7ee4d4564c
2 changed files with 13 additions and 0 deletions

View File

@ -173,6 +173,15 @@ function start_new_ovs () {
sudo /usr/share/openvswitch/scripts/ovs-ctl start
}
# stop_new_ovs() - stops ovs
function stop_new_ovs () {
local ovs_ctl='/usr/share/openvswitch/scripts/ovs-ctl'
if [ -x $ovs_ctl ] ; then
sudo $ovs_ctl stop
fi
}
# remove_ovs_packages() - removes old ovs packages from the system
function remove_ovs_packages() {
for package in openvswitch openvswitch-switch openvswitch-common; do

View File

@ -69,4 +69,8 @@ elif [[ "$1" == "unstack" ]]; then
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
stop_l2_agent_sriov
fi
if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \
[[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then
stop_new_ovs
fi
fi