Commit fa300b48 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fix rgw PUT failure

parent b53c9f56
...@@ -34,6 +34,7 @@ all: ceph-config ...@@ -34,6 +34,7 @@ all: ceph-config
patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-PrimaryLogPG_calc_trim_to_fix.patch patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-PrimaryLogPG_calc_trim_to_fix.patch
patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-OSDMonitor_update_pending_pgs_fix.patch patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-OSDMonitor_update_pending_pgs_fix.patch
patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-rgw_get_request_metadata_fix.patch patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-rgw_get_request_metadata_fix.patch
patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-rgw_max_attr_name_len_fix.patch
patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-take_min_status_fix.patch patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-take_min_status_fix.patch
patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-rgw_rest_swift_fix.patch patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-rgw_rest_swift_fix.patch
patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-largest_singleton_fix.patch patch -Np1 -d ceph-13.2.5 < ceph-13.2.5-largest_singleton_fix.patch
......
diff -uNr ceph-13.2.5/src/common/options.cc ceph-13.2.5-rgw_max_attr_name_len_fix/src/common/options.cc
--- ceph-13.2.5/src/common/options.cc 2019-03-13 03:18:03.000000000 +1030
+++ ceph-13.2.5-rgw_max_attr_name_len_fix/src/common/options.cc 2019-03-28 19:32:31.030107561 +1030
@@ -4989,7 +4989,7 @@
.set_default(0)
.set_description("The maximum length of metadata value. 0 skips the check"),
- Option("rgw_max_attr_name_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+ Option("rgw_max_attr_name_len", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
.set_default(0)
.set_description("The maximum length of metadata name. 0 skips the check"),
...@@ -6,7 +6,7 @@ diff -uNr ceph-13.2.5/src/rgw/rgw_rest_swift.cc ceph-13.2.5-rgw_rest_swift_fix/s ...@@ -6,7 +6,7 @@ diff -uNr ceph-13.2.5/src/rgw/rgw_rest_swift.cc ceph-13.2.5-rgw_rest_swift_fix/s
const auto error_message = boost::str( const auto error_message = boost::str(
boost::format("Too many metadata items; max %lld") boost::format("Too many metadata items; max %lld")
- % s->cct->_conf->get_val<size_t>("rgw_max_attrs_num_in_req")); - % s->cct->_conf->get_val<size_t>("rgw_max_attrs_num_in_req"));
+ % s->cct->_conf->get_val<uint64_t>("rgw_max_attrs_num_in_req")); + % s->cct->_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req"));
set_req_state_err(s, EINVAL, error_message); set_req_state_err(s, EINVAL, error_message);
return -EINVAL; return -EINVAL;
} }
...@@ -24,7 +24,7 @@ diff -uNr ceph-13.2.5/src/rgw/rgw_rest_swift.cc ceph-13.2.5-rgw_rest_swift_fix/s ...@@ -24,7 +24,7 @@ diff -uNr ceph-13.2.5/src/rgw/rgw_rest_swift.cc ceph-13.2.5-rgw_rest_swift_fix/s
const size_t meta_num_limit = \ const size_t meta_num_limit = \
- g_conf->get_val<size_t>("rgw_max_attrs_num_in_req"); - g_conf->get_val<size_t>("rgw_max_attrs_num_in_req");
+ g_conf->get_val<uint64_t>("rgw_max_attrs_num_in_req"); + g_conf->get_val<Option::size_t>("rgw_max_attrs_num_in_req");
if (meta_num_limit) { if (meta_num_limit) {
formatter.dump_int("max_meta_count", meta_num_limit); formatter.dump_int("max_meta_count", meta_num_limit);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment