]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGWLC: debug tags in rgwlc_s3_expiration_header
authorMatt Benjamin <mbenjamin@redhat.com>
Tue, 19 Feb 2019 14:30:18 +0000 (09:30 -0500)
committerYuval Lifshitz <yuvalif@yahoo.com>
Tue, 3 Mar 2020 11:19:42 +0000 (13:19 +0200)
Dump object tags to log at debug level 16.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 45f463fec55aebe53fa91aebf891dd9cb6cc1e19)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
src/rgw/rgw_lc.cc

index 914d4fc7023d97982ad9f8d1ea8106d1bd14681e..3089f5282a164b2227a36b34f7cc011bc81a005f 100644 (file)
@@ -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<ceph::real_time> expiration_date;
   boost::optional<std::string> 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;