Merge "Make allow_{resize|migrate}_to_same_host configurable"
diff --git a/lib/nova b/lib/nova
index f47dc97..0f83807 100644
--- a/lib/nova
+++ b/lib/nova
@@ -137,6 +137,10 @@
# running the VM - removing a SPOF and bandwidth bottleneck.
MULTI_HOST=`trueorfalse False $MULTI_HOST`
+# ``NOVA_ALLOW_MOVE_TO_SAME_HOST` can be set to False in multi node devstack,
+# where there are at least two nova-computes.
+NOVA_ALLOW_MOVE_TO_SAME_HOST=`trueorfalse True $NOVA_ALLOW_MOVE_TO_SAME_HOST`
+
# Test floating pool and range are used for testing. They are defined
# here until the admin APIs can replace nova-manage
TEST_FLOATING_POOL=${TEST_FLOATING_POOL:-test}
@@ -411,8 +415,10 @@
rm -f $NOVA_CONF
iniset $NOVA_CONF DEFAULT verbose "True"
iniset $NOVA_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
- iniset $NOVA_CONF DEFAULT allow_resize_to_same_host "True"
- iniset $NOVA_CONF DEFAULT allow_migrate_to_same_host "True"
+ if [ "$NOVA_ALLOW_MOVE_TO_SAME_HOST" == "True" ]; then
+ iniset $NOVA_CONF DEFAULT allow_resize_to_same_host "True"
+ iniset $NOVA_CONF DEFAULT allow_migrate_to_same_host "True"
+ fi
iniset $NOVA_CONF DEFAULT api_paste_config "$NOVA_API_PASTE_INI"
iniset $NOVA_CONF DEFAULT rootwrap_config "$NOVA_CONF_DIR/rootwrap.conf"
iniset $NOVA_CONF DEFAULT scheduler_driver "$SCHEDULER"