From ef4bd99c2f1ba4d0df65152d2b3a4927b7a813bd Mon Sep 17 00:00:00 2001 From: anascko Date: Thu, 2 Feb 2017 11:21:22 +0200 Subject: [PATCH] Adds network check in upgrade phase in devstack When running grenade with multitenancy, we are able to boot instances in the network neutron has created in its upgrade phase, and we don't have to change that setup. Change-Id: I1038548ad4f93788fca3e2b7dd8ed93da0ce7702 --- devstack/upgrade/resources.sh | 10 ++++++++++ devstack/upgrade/upgrade.sh | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh index ef26e67fc7..80a5463897 100755 --- a/devstack/upgrade/resources.sh +++ b/devstack/upgrade/resources.sh @@ -33,6 +33,11 @@ set -o xtrace function early_create { + # We need these steps only in case of flat-network + if [[ -n "${IRONIC_PROVISION_NETWORK_NAME}" ]]; then + return + fi + # Ironic needs to have network access to the instance during deployment # from the control plane (ironic-conductor). This 'early_create' function # creates a new network with a unique CIDR, adds a route to this network @@ -98,6 +103,11 @@ function verify_noapi { } function destroy { + # We need these steps only in case of flat-network + if [[ -n "${IRONIC_PROVISION_NETWORK_NAME}" ]]; then + return + fi + # NOTE(vsaienko) move ironic VMs back to private network. local net_id net_id=$(openstack network show private -f value -c id) diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh index 1bc00deea2..7820a54226 100755 --- a/devstack/upgrade/upgrade.sh +++ b/devstack/upgrade/upgrade.sh @@ -86,11 +86,14 @@ start_nova_compute ensure_services_started ironic-api ironic-conductor ensure_logs_exist ir-cond ir-api +# We need these steps only in case of flat-network # NOTE(vsaienko) starting from Ocata when Neutron is restarted there is no guarantee that # internal tag, that was assigned to network will be the same. As result we need to update # tag on link between br-int and brbm to new value after restart. -net_id=$(openstack network show ironic_grenade -f value -c id) -create_ovs_taps $net_id +if [[ -z "${IRONIC_PROVISION_NETWORK_NAME}" ]]; then + net_id=$(openstack network show ironic_grenade -f value -c id) + create_ovs_taps $net_id +fi set +o xtrace echo "*********************************************************************"