From 3a652e52b32f03a1564c7d10069d9b6fe8105495 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Mon, 22 Oct 2018 14:41:20 +0300 Subject: [PATCH] Devstack plugin: fetch Neutron only when needed When Neutron is already fetched by devstack, it is not required to fetch it in the devstack plugin. Doing so causes problems when devstack fetches a specifig branch of Neutron. Change-Id: Iaf2bc9bd76f78d32c7565ccd6288f96cbf6610d7 --- devstack/lib/nsx_common | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/devstack/lib/nsx_common b/devstack/lib/nsx_common index de370b8ff8..a19a78bff0 100644 --- a/devstack/lib/nsx_common +++ b/devstack/lib/nsx_common @@ -47,12 +47,16 @@ function install_neutron_projects { sudo chown -R ${USER}:${USER} src/${pkg} fi done - sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron - sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron.egg* - sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron - sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron.egg* - sudo pip install -e "git+https://git.openstack.org/openstack/neutron#egg=neutron" - sudo chown -R ${USER}:${USER} src/neutron + if is_service_enabled neutron; then + echo "service Neutron is enabled explicitly by devstack" + else + sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron + sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron.egg* + sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron + sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron.egg* + sudo pip install -e "git+https://git.openstack.org/openstack/neutron#egg=neutron" + sudo chown -R ${USER}:${USER} src/neutron + fi } function nsxv_configure_service {