From 5de0c24676a30815d324959084917ad40e700a12 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh index 15d334f7c..6b3fe6c60 100755 --- a/devstack/upgrade/upgrade.sh +++ b/devstack/upgrade/upgrade.sh @@ -61,8 +61,9 @@ set -o xtrace initialize_database_backends function is_nova_migration { - # Determine whether we're "upgrading" from another compute driver - _ironic_old_driver=$(source $BASE_DEVSTACK_DIR/functions; source $BASE_DEVSTACK_DIR/localrc; echo $VIRT_DRIVER) + # Deterine whether we're "upgrading" from another compute 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" ] }