]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: lifecycle days may be 0 31073/head
authorMatt Benjamin <mbenjamin@redhat.com>
Sat, 16 Feb 2019 22:06:28 +0000 (17:06 -0500)
committerNathan Cutler <ncutler@suse.com>
Wed, 23 Oct 2019 11:27:54 +0000 (13:27 +0200)
This appears to be true in general, though the only examples
in AWS documentation appear to be in Transition rules, a
number are found here:
https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html

Fixes: https://tracker.ceph.com/issues/38389
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit b050312adf6b51d3cfa64c155f00880158058249)

src/rgw/rgw_lc.h

index d662173d9ff1bc7ff884dde736b6ab73f3671313..df101e8370e07c8eef46efb8916aec4ca7947d8b 100644 (file)
@@ -85,7 +85,7 @@ public:
   bool valid() const {
     if (!days.empty() && !date.empty()) {
       return false;
-    } else if (!days.empty() && get_days() <= 0) {
+    } else if (!days.empty() && get_days() < 0) {
       return false;
     }
     //We've checked date in xml parsing