From 6dd896feface3d0413437221a63e508b359ed615 Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Tue, 26 Apr 2022 16:37:07 +0530 Subject: [PATCH] Allow to skip stop of ovn services Grenade jobs stop services, check fip connectivity for a nova server and then upgrade to next release. But since ovn data plane and db services are stopped along with other services, fip connectivity fails as a result. We shouldn't stop these services along with other neutron services. This patch adds a new variable "SKIP_STOP_OVN" which can be used by grenade jobs to skip stop of ovn services. This will also fix the ovn grenade jobs. Also source fixup_stuff.sh so function fixup_ovn_centos is available. It's already sourced in stack.sh but that's not used in grenade run. Change-Id: I94818a19f19973779cb2e11753d2881d54dfa3bc --- lib/neutron-legacy | 5 ++++- lib/neutron_plugins/ovn_agent | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 88ac991167..e9b55b6b02 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -138,6 +138,9 @@ Q_NOTIFY_NOVA_PORT_DATA_CHANGES=${Q_NOTIFY_NOVA_PORT_DATA_CHANGES:-True} VIF_PLUGGING_IS_FATAL=${VIF_PLUGGING_IS_FATAL:-True} VIF_PLUGGING_TIMEOUT=${VIF_PLUGGING_TIMEOUT:-300} +# Allow to skip stopping of OVN services +SKIP_STOP_OVN=${SKIP_STOP_OVN:-False} + # The directory which contains files for Q_PLUGIN_EXTRA_CONF_FILES. # /etc/neutron is assumed by many of devstack plugins. Do not change. _Q_PLUGIN_EXTRA_CONF_PATH=/etc/neutron @@ -638,7 +641,7 @@ function stop_mutnauq { stop_mutnauq_other stop_mutnauq_l2_agent - if [[ $Q_AGENT == "ovn" ]]; then + if [[ $Q_AGENT == "ovn" && $SKIP_STOP_OVN != "True" ]]; then stop_ovn fi } diff --git a/lib/neutron_plugins/ovn_agent b/lib/neutron_plugins/ovn_agent index 9022f2d382..dfd55deae5 100644 --- a/lib/neutron_plugins/ovn_agent +++ b/lib/neutron_plugins/ovn_agent @@ -395,6 +395,8 @@ function install_ovn { sudo mkdir -p $OVS_PREFIX/var/log/ovn sudo chown $(whoami) $OVS_PREFIX/var/log/ovn else + # Load fixup_ovn_centos + source ${TOP_DIR}/tools/fixup_stuff.sh fixup_ovn_centos install_package $(get_packages openvswitch) install_package $(get_packages ovn)