From 679f395fbbae68b4dfee0edbddff646ff75b5a0d Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Mon, 9 Mar 2015 23:45:18 +0800 Subject: [PATCH] Set os_region_name for cinder Region name should be set to nova.conf and cinder.conf so that cinder volume can work in multiregion env. Closes-Bug: #1429738 Change-Id: Ib20911c24d8daabc07e6515f4a23a745d77593ff --- lib/cinder | 2 ++ lib/nova | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/cinder b/lib/cinder index 0d157dd78e..19240eec60 100644 --- a/lib/cinder +++ b/lib/cinder @@ -242,6 +242,8 @@ function configure_cinder { # supported. iniset $CINDER_CONF DEFAULT enable_v1_api true + iniset $CINDER_CONF DEFAULT os_region_name "$REGION_NAME" + if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then local enabled_backends="" local default_name="" diff --git a/lib/nova b/lib/nova index e9e78c7bc4..199daeea3d 100644 --- a/lib/nova +++ b/lib/nova @@ -544,6 +544,8 @@ function create_nova_conf { iniset $NOVA_CONF DEFAULT ec2_workers "$API_WORKERS" iniset $NOVA_CONF DEFAULT metadata_workers "$API_WORKERS" + iniset $NOVA_CONF cinder os_region_name "$REGION_NAME" + if [[ "$NOVA_BACKEND" == "LVM" ]]; then iniset $NOVA_CONF libvirt images_type "lvm" iniset $NOVA_CONF libvirt images_volume_group $DEFAULT_VOLUME_GROUP_NAME