From d099254b80194aadf13ecb8c33066392b1bb49e8 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Tue, 19 Feb 2019 09:30:18 -0500 Subject: [PATCH] RGWLC: debug tags in rgwlc_s3_expiration_header Dump object tags to log at debug level 16. Signed-off-by: Matt Benjamin (cherry picked from commit 45f463fec55aebe53fa91aebf891dd9cb6cc1e19) Signed-off-by: Yuval Lifshitz --- src/rgw/rgw_lc.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 914d4fc7023d9..3089f5282a164 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1552,6 +1552,16 @@ std::string s3_expiration_header( return hdr; } /* catch */ + /* dump tags at debug level 16 */ + RGWObjTags::tag_map_t obj_tag_map = obj_tagset.get_tags(); + if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 16)) { + for (const auto& elt : obj_tag_map) { + ldout(cct, 16) << __func__ + << "() key=" << elt.first << " val=" << elt.second + << dendl; + } + } + boost::optional expiration_date; boost::optional rule_id; @@ -1596,7 +1606,6 @@ std::string s3_expiration_header( if (filter.has_tags()) { bool tag_match = true; const RGWObjTags& rule_tagset = filter.get_tags(); - RGWObjTags::tag_map_t obj_tag_map = obj_tagset.get_tags(); for (auto& tag : rule_tagset.get_tags()) { if (obj_tag_map.find(tag.first) == obj_tag_map.end()) { tag_match = false; -- 2.39.5