From 11d8feb8a0064b7c8a8c810d0ffee600293ece65 Mon Sep 17 00:00:00 2001 From: zhangzhiming Date: Fri, 14 Jan 2022 11:28:52 +0800 Subject: [PATCH] rgw: Get canonical storage class when storage class is empty in lifecycle configuration. Fixes: https://tracker.ceph.com/issues/53878 Signed-off-by: zhiming zhang (cherry picked from commit 3a797b3be289f74f26cdfbe82461890b7a4eb2a9) --- src/rgw/rgw_lc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 1a23988f8fc7f..4fa8d409d7dab 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -141,7 +141,8 @@ bool RGWLifecycleConfiguration::_add_rule(const LCRule& rule) transition_action action; action.days = elem.second.get_days(); action.date = ceph::from_iso_8601(elem.second.get_date()); - action.storage_class = elem.first; + action.storage_class + = rgw_placement_rule::get_canonical_storage_class(elem.first); op.noncur_transitions.emplace(elem.first, std::move(action)); } std::string prefix; -- 2.39.5