From 6e7e1c941a3ea9e2d30a6b59ccce2c5efa44b349 Mon Sep 17 00:00:00 2001 From: Andrew Laski Date: Wed, 31 Oct 2012 16:11:37 -0400 Subject: [PATCH] Don't enable osapi_volume if n-vol not enabled. Enabling cinder removes osapi_volume from enabled_apis in nova.conf but if neither cinder or n-vol are enabled it should not be there. It seems that volume code is being removed from nova so osapi_volume should not be enabled by default. Fixes bug #1073701 Change-Id: I626a941f434b1c8c1a73b32318e21c99445b5541 --- lib/nova | 2 ++ stackrc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/nova b/lib/nova index 95d5d87cff..77979276b3 100644 --- a/lib/nova +++ b/lib/nova @@ -305,6 +305,8 @@ function create_nova_conf() { add_nova_opt "enabled_apis=$NOVA_ENABLED_APIS" fi if is_service_enabled n-vol; then + NOVA_ENABLED_APIS="${NOVA_ENABLED_APIS},osapi_volume" + iniset $NOVA_CONF DEFAULT enabled_apis $NOVA_ENABLED_APIS add_nova_opt "volume_api_class=nova.volume.api.API" add_nova_opt "volume_group=$VOLUME_GROUP" add_nova_opt "volume_name_template=${VOLUME_NAME_PREFIX}%s" diff --git a/stackrc b/stackrc index e587efa8f2..283b2712c3 100644 --- a/stackrc +++ b/stackrc @@ -18,7 +18,7 @@ DEST=/opt/stack ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit # Set the default Nova APIs to enable -NOVA_ENABLED_APIS=ec2,osapi_compute,osapi_volume,metadata +NOVA_ENABLED_APIS=ec2,osapi_compute,metadata # Repositories # ------------