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
This commit is contained in:
Vasyl Saienko 2016-11-30 11:29:35 +02:00 committed by Anton Arefiev
parent 2f1b192eba
commit 5de0c24676

View File

@ -61,8 +61,9 @@ set -o xtrace
initialize_database_backends initialize_database_backends
function is_nova_migration { function is_nova_migration {
# Determine whether we're "upgrading" from another compute driver # 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" ] [ "$_ironic_old_driver" != "ironic" ]
} }