From 36218e6c50c9eb22003eefe0389b00cbf7132dfb Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 30 Sep 2015 10:33:57 +0000 Subject: [PATCH] Revert "Disable Cinder v1 API support by default" There has been a ton of fall out from this change, and I think it's been premature. We should revert and try again when more of the client space supports this. This reverts commit a29434460e869b7bb397044d8f073531e4ee112d. Change-Id: I1658dc48a024627be0fdb39c46137aaa3d9b911a --- doc/source/configuration.rst | 7 ------- lib/cinder | 29 ++++++++++++----------------- lib/tempest | 9 --------- 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 3bd246d870..983f5c0aae 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -587,13 +587,6 @@ with ``VOLUME_BACKING_FILE_SIZE``. VOLUME_BACKING_FILE_SIZE=10250M -Cinder v1 API is depricated and disabled by default. You can enable v1 API by -setting ``CINDER_ENABLE_V1_API`` to ``True``. - - :: - CINDER_ENABLE_V1_API=True - - Keystone ~~~~~~~~ diff --git a/lib/cinder b/lib/cinder index f0b0f1d7e5..26277ccaba 100644 --- a/lib/cinder +++ b/lib/cinder @@ -27,9 +27,6 @@ set +o xtrace # Defaults # -------- -# NOTE (e0ne): Cinder API v1 is deprecated and will be disabled by default. -CINDER_ENABLE_V1_API=$(trueorfalse False CINDER_ENABLE_V1_API) - # set up default driver CINDER_DRIVER=${CINDER_DRIVER:-default} CINDER_PLUGINS=$TOP_DIR/lib/cinder_plugins @@ -228,12 +225,9 @@ function configure_cinder { iniset $CINDER_CONF oslo_concurrency lock_path $CINDER_STATE_PATH iniset $CINDER_CONF DEFAULT periodic_interval $CINDER_PERIODIC_INTERVAL # NOTE(thingee): Cinder V1 API is deprecated and defaults to off as of - # Juno. - if [[ ${CINDER_ENABLE_V1_API} = True ]]; then - iniset $CINDER_CONF DEFAULT enable_v1_api true - else - iniset $CINDER_CONF DEFAULT enable_v1_api false - fi + # Juno. Keep it enabled so we can continue testing while it's still + # supported. + iniset $CINDER_CONF DEFAULT enable_v1_api true iniset $CINDER_CONF DEFAULT os_region_name "$REGION_NAME" @@ -332,13 +326,12 @@ function create_cinder_accounts { if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then - if [[ ${CINDER_ENABLE_V1_API} = True ]]; then - get_or_create_service "cinder" "volume" "Cinder Volume Service" - get_or_create_endpoint "volume" "$REGION_NAME" \ - "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \ - "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \ - "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" - fi + get_or_create_service "cinder" "volume" "Cinder Volume Service" + get_or_create_endpoint "volume" "$REGION_NAME" \ + "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \ + "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \ + "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" + get_or_create_service "cinderv2" "volumev2" "Cinder Volume Service V2" get_or_create_endpoint "volumev2" "$REGION_NAME" \ "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(tenant_id)s" \ @@ -489,7 +482,9 @@ function create_volume_types { local be be_name for be in ${CINDER_ENABLED_BACKENDS//,/ }; do be_name=${be##*:} - openstack volume type create --os-volume-api-version 2 --property volume_backend_name="${be_name}" ${be_name} + # FIXME(jamielennox): Remove --os-volume-api-version pinning when + # osc supports volume type create on v2 api. bug #1475060 + openstack volume type create --os-volume-api-version 1 --property volume_backend_name="${be_name}" ${be_name} done fi } diff --git a/lib/tempest b/lib/tempest index 3624b9605e..d372e0f6ca 100644 --- a/lib/tempest +++ b/lib/tempest @@ -494,15 +494,6 @@ function configure_tempest { iniset $TEMPEST_CONFIG volume-feature-enabled backup False fi - # Use only Cinder API v2 - if [[ ${CINDER_ENABLE_V1_API} = True ]]; then - iniset $TEMPEST_CONFIG volume-feature-enabled api_v1 True - iniset $TEMPEST_CONFIG volume catalog_type volume - else - iniset $TEMPEST_CONFIG volume-feature-enabled api_v1 False - iniset $TEMPEST_CONFIG volume catalog_type volumev2 - fi - # Using ``CINDER_ENABLED_BACKENDS`` if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True"