From c81b385843e16dacf2355e81231356b5b1b36e93 Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Wed, 30 Nov 2016 11:29:35 +0200 Subject: [PATCH] Do not source old/localrc twise in grenade By sourcing localrc second time we try to enable ironic plugin one more time witch is not allowed by [0] This patch checks if ironic was enabled or not in base environment without sourcing localrc. [0] https://review.openstack.org/#/c/396794/ Change-Id: I432c243c66c0d11adcf4c6568968fbeaaf9acdcd --- devstack/upgrade/upgrade.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh index 1276bfb327..ccb54a8fdf 100755 --- a/devstack/upgrade/upgrade.sh +++ b/devstack/upgrade/upgrade.sh @@ -56,7 +56,8 @@ set -o xtrace function is_nova_migration { # Deterine whether we're "upgrading" from another compute driver - _ironic_old_driver=$(source $BASE_DEVSTACK_DIR/functions; source $BASE_DEVSTACK_DIR/localrc; echo $VIRT_DRIVER) + # read localrc from the end, pick only first match + _ironic_old_driver=$( tac $BASE_DEVSTACK_DIR/localrc |grep -m 1 VIRT_DRIVER | awk -F '=' '{print $2}') [ "$_ironic_old_driver" != "ironic" ] }