Browse code

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

Andrew Laski authored on 2012/11/01 05:11:37
Showing 2 changed files
... ...
@@ -305,6 +305,8 @@ function create_nova_conf() {
305 305
         add_nova_opt "enabled_apis=$NOVA_ENABLED_APIS"
306 306
     fi
307 307
     if is_service_enabled n-vol; then
308
+        NOVA_ENABLED_APIS="${NOVA_ENABLED_APIS},osapi_volume"
309
+        iniset $NOVA_CONF DEFAULT enabled_apis $NOVA_ENABLED_APIS
308 310
         add_nova_opt "volume_api_class=nova.volume.api.API"
309 311
         add_nova_opt "volume_group=$VOLUME_GROUP"
310 312
         add_nova_opt "volume_name_template=${VOLUME_NAME_PREFIX}%s"
... ...
@@ -18,7 +18,7 @@ DEST=/opt/stack
18 18
 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
19 19
 
20 20
 # Set the default Nova APIs to enable
21
-NOVA_ENABLED_APIS=ec2,osapi_compute,osapi_volume,metadata
21
+NOVA_ENABLED_APIS=ec2,osapi_compute,metadata
22 22
 
23 23
 # Repositories
24 24
 # ------------