From f6fe0652d0af5dcc70ec5ece32b6ee322ec37ba9 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Tue, 16 Aug 2016 07:16:56 -0700 Subject: [PATCH] NSX|V3: only run cleanup for devstack if q-svc is enabled This causes issues when running on a multi-node setup and one wants to unstack on the node. Change-Id: I5a7ee79614a9a6a04abe6842a63c1ba2c2775424 --- devstack/plugin.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index fb361da5b8..ba84425c8d 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -43,11 +43,14 @@ elif [[ $Q_PLUGIN == 'vmware_nsx_v3' ]]; then init_vmware_nsx_v3 elif [[ "$1" == "unstack" ]]; then stop_vmware_nsx_v3 - NSX_MANAGER=${NSX_MANAGERS:-$NSX_MANAGER} - IFS=',' - NSX_MANAGER=($NSX_MANAGER) - unset IFS - python $dir/tools/nsxv3_cleanup.py --mgr-ip $NSX_MANAGER --user $NSX_USER --password $NSX_PASSWORD + # only clean up when q-svc (legacy support) or neutron-api is enabled + if is_service_enabled q-svc || is_service_enabled neutron-api; then + NSX_MANAGER=${NSX_MANAGERS:-$NSX_MANAGER} + IFS=',' + NSX_MANAGER=($NSX_MANAGER) + unset IFS + python $dir/tools/nsxv3_cleanup.py --mgr-ip $NSX_MANAGER --user $NSX_USER --password $NSX_PASSWORD + fi fi elif [[ $Q_PLUGIN == 'vmware_dvs' ]]; then source $dir/lib/vmware_dvs