After a recent update I’ve started seeing these errors crop up on the log. Never seen them before. Any idea why or how to fix them or what issues they may cause?
Message (3 copies reported)
Job exception: Found two rules with same prefix ‘tombstone/’
Backtrace
Okay so going through your link it looks like I need to update the bucket to support lifecycle.
BTW just for the record, this bucket was created a few months ago, I just went to S3 and created a new bucket. Does discourse need a special type of bucket?
I looked at the Amazon S3 bucket and it does have lifecycle enabled on it. I also see a purge-tombstone rule in it which I’m assuming was created by discourse (possibly related to my original error post) and lifecycle is enabled.
EDIT: Also what’s the implication of this error? Can I just delete the Tombstone rule and let discourse recreate it? This started after the latest update.
EDIT 2: I was exploring the amazon docs and according to the docs
You can use lifecycle policies to define actions you want Amazon S3 to take during an object’s lifetime (for example, transition objects to another storage class, archive them, or delete them after a specified period of time).
Looks like this rule was created by discourse. Going back to my original error, where there was a duplicate tombstone rule, do you think there was a bug in the code which caused it to create a rule of the wrong type? If so, can’t the code look at the rule it previously created and if it runs into the error, delete it and recreate it using the right type of rule? This isn’t something I created manually for sure.
Could it be a combination of these changes that caused this error to pop up. This is probably going to impact any deployment who was on that BETA build, maybe they just haven’t seen their error logs.
Apparently Amazon doesn’t provide support for regular accounts. I’m going to try to post it on the forum to see if anyone has any idea but I’m AMAZED that Amazon is providing libraries that breaks their setup and like I said this is a new setup with Amazon barely a year old.
So to clarify a bit, there is no V1 and V2 bucket concept, you just need to make sure you are using the put_bucket_lifecycle_configuration operation instead of put_bucket_lifecycle for all targeting buckets. If you still see an issue, could you try setting :http_wire_trace to true to give us a full http wire trace for debugging?
and
Hello,
The error you're experiencing is caused by using the 'Prefix' base tag and the 'Filter' base tag in a single Lifecycle policy. These tags are mutually exclusive and cannot be combined within a single policy.
You'll stop seeing this error if you wrap all of your base 'Prefix' tags in a 'Filter' tag. Here's an example of a broken policy and what it should look like in order for it to work.
In the bad policy, Rule 1 uses a base 'Prefix' tag and Rule 2 wraps the 'Prefix' in a 'Filter' tag. In order to address this, the corrected policy has Rule 1 wrap its 'Prefix' tag in a 'Filter' tag. The tags that cause this issue are in bold for clarity.
Bad Policy
<LifecycleConfiguration>
<Rule>
<ID>Rule1</ID>
<Prefix>a</Prefix>
<Expiration>
<Days>2048</Days>
</Expiration>
<Status>Enabled</Status>
</Rule>
<Rule>
<ID>Rule2</ID>
<Filter>
<Prefix>b</Prefix>
</Filter>
<Transition>
<Days>1024</Days>
<StorageClass>STANDARD_IA</StorageClass>
</Transition>
<Status>Enabled</Status>
</Rule>
</LifecycleConfiguration>
Corrected Policy
<LifecycleConfiguration>
<Rule>
<ID>Rule1</ID>
<Filter>
<Prefix>a</Prefix>
</Filter>
<Expiration>
<Days>2048</Days>
</Expiration>
<Status>Enabled</Status>
</Rule>
<Rule>
<ID>Rule2</ID>
<Filter>
<Prefix>b</Prefix>
</Filter>
<Transition>
<Days>1024</Days>
<StorageClass>STANDARD_IA</StorageClass>
</Transition>
<Status>Enabled</Status>
</Rule>
</LifecycleConfiguration>
Please let me know if you have any further questions.
Great thanks for looking into it. So for clarification, when Amazon fixes the bug in the library, your patch would still work or would it need updating?