]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Object tags shouldn't work with deletemarker expiration and multipart expiration.
authorzhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Mon, 17 Jun 2019 11:11:39 +0000 (19:11 +0800)
committerzhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Tue, 18 Jun 2019 01:04:24 +0000 (09:04 +0800)
Fixes: http://tracker.ceph.com/issues/40405
Signed-off-by: zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
src/rgw/rgw_lc.cc

index 8abb73a27a91da20df526c14da42b374fb38e65a..59b92c7acbb4126ae249914eb0e97ce8d26a4107 100644 (file)
@@ -139,6 +139,9 @@ int RGWLifecycleConfiguration::check_and_add_rule(const LCRule& rule)
   if (rule_map.find(id) != rule_map.end()) {  //id shouldn't be the same 
     return -EINVAL;
   }
+  if (rule.get_filter().has_tags() && (rule.get_dm_expiration() || !rule.get_mp_expiration().empty())) {
+    return -ERR_INVALID_REQUEST;
+  }
   rule_map.insert(pair<string, LCRule>(id, rule));
 
   if (!_add_rule(rule)) {