summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranascko <ovoshchana@mirantis.com>2017-02-02 11:21:22 +0200
committeranascko <ovoshchana@mirantis.com>2017-02-07 11:28:46 +0200
commitef4bd99c2f1ba4d0df65152d2b3a4927b7a813bd (patch)
treeba245cba58fb5f92793501fe6cd95ae968139b99
parent5071b99835143ebcae876432e2982fd27faece10 (diff)
downloadironic-ef4bd99c2f1ba4d0df65152d2b3a4927b7a813bd.tar.gz
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
-rwxr-xr-xdevstack/upgrade/resources.sh10
-rwxr-xr-xdevstack/upgrade/upgrade.sh7
2 files changed, 15 insertions, 2 deletions
diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh
index ef26e67fc..80a546389 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 1bc00deea..7820a5422 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 "*********************************************************************"