From: Yehuda Sadeh Date: Sat, 12 Mar 2016 00:07:15 +0000 (-0800) Subject: rgw: disable swift versioning by default X-Git-Tag: v10.1.0~126^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=861676357e3b8f44226369463a6e0c61828da2d7;p=ceph-ci.git rgw: disable swift versioning by default Signed-off-by: Yehuda Sadeh --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index e9801bdc274..12b8c4dc270 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1359,6 +1359,8 @@ OPTION(rgw_realm_reconfigure_delay, OPT_DOUBLE, 2) // seconds to wait before rel OPTION(rgw_period_push_interval, OPT_DOUBLE, 2) // seconds to wait before retrying "period push" OPTION(rgw_period_push_interval_max, OPT_DOUBLE, 30) // maximum interval after exponential backoff +OPTION(rgw_swift_versioning_enabled, OPT_BOOL, false) // whether swift object versioning feature is enabled + OPTION(mutex_perf_counter, OPT_BOOL, false) // enable/disable mutex perf counter OPTION(throttler_perf_counter, OPT_BOOL, true) // enable/disable throttler perf counter diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index 0d292ed2ed0..fbd087f8940 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -483,7 +483,9 @@ int RGWCreateBucket_ObjStore_SWIFT::get_params() location_constraint = store->get_zonegroup().api_name; placement_rule = s->info.env->get("HTTP_X_STORAGE_POLICY", ""); - swift_ver_location = s->info.env->get("HTTP_X_VERSIONS_LOCATION", ""); + if (s->cct->_conf->rgw_swift_versioning_enabled) { + swift_ver_location = s->info.env->get("HTTP_X_VERSIONS_LOCATION", ""); + } return 0; } @@ -735,7 +737,9 @@ int RGWPutMetadataBucket_ObjStore_SWIFT::get_params() rmattr_names); placement_rule = s->info.env->get("HTTP_X_STORAGE_POLICY", ""); - swift_ver_location = s->info.env->get("HTTP_X_VERSIONS_LOCATION", ""); + if (s->cct->_conf->rgw_swift_versioning_enabled) { + swift_ver_location = s->info.env->get("HTTP_X_VERSIONS_LOCATION", ""); + } return 0; }