]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: disable swift versioning by default 8066/head
authorYehuda Sadeh <yehuda@redhat.com>
Sat, 12 Mar 2016 00:07:15 +0000 (16:07 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Sat, 12 Mar 2016 00:20:44 +0000 (16:20 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/common/config_opts.h
src/rgw/rgw_rest_swift.cc

index e9801bdc2744175f9415d73026c2a599095b69b4..12b8c4dc270a80b1f3342dabc07b836c3d247e09 100644 (file)
@@ -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
 
index 0d292ed2ed0a3a03288fe964b27b24b2cf8651c7..fbd087f894014906bd115dde32bf8dc95eb8ea94 100644 (file)
@@ -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;
 }