summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_sal.cc
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2022-09-01 17:08:06 +0200
committerCasey Bodley <cbodley@redhat.com>2022-09-01 17:08:08 +0200
commitafd799eae1f3d4a35f28db6a93e700c785c91a9f (patch)
treeb18408b554a00cb67e0179c773c1ec40982e2e20 /src/rgw/rgw_sal.cc
parentMerge pull request #47885 from ceph/boost-focal (diff)
downloadceph-afd799eae1f3d4a35f28db6a93e700c785c91a9f.tar.xz
ceph-afd799eae1f3d4a35f28db6a93e700c785c91a9f.zip
rgw: fix d3n crash in StoreManager::get_config()
config options with `type: size` are not actually `size_t` but `uint64_t`, so accessing them with `get_val<size_t>()` leads to a `bad_variant_access` exception. use the `Option::size_t` type instead Fixes: https://tracker.ceph.com/issues/57195 Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_sal.cc')
-rw-r--r--src/rgw/rgw_sal.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rgw/rgw_sal.cc b/src/rgw/rgw_sal.cc
index 37b95cf0dbe..02c08184723 100644
--- a/src/rgw/rgw_sal.cc
+++ b/src/rgw/rgw_sal.cc
@@ -304,8 +304,8 @@ StoreManager::Config StoreManager::get_config(bool admin, CephContext* cct)
/* Check to see if d3n is configured, but only for non-admin */
const auto& d3n = g_conf().get_val<bool>("rgw_d3n_l1_local_datacache_enabled");
if (!admin && d3n) {
- if (g_conf().get_val<size_t>("rgw_max_chunk_size") !=
- g_conf().get_val<size_t>("rgw_obj_stripe_size")) {
+ if (g_conf().get_val<Option::size_t>("rgw_max_chunk_size") !=
+ g_conf().get_val<Option::size_t>("rgw_obj_stripe_size")) {
lsubdout(cct, rgw_datacache, 0) << "rgw_d3n: WARNING: D3N DataCache disabling (D3N requires that the chunk_size equals stripe_size)" << dendl;
} else if (!g_conf().get_val<bool>("rgw_beast_enable_async")) {
lsubdout(cct, rgw_datacache, 0) << "rgw_d3n: WARNING: D3N DataCache disabling (D3N requires yield context - rgw_beast_enable_async=true)" << dendl;