Bug 2281729

Summary: [MCG] The prefix filter is ignored in log-based replication policies
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Sagi Hirshfeld <shirshfe>
Component: Multi-Cloud Object GatewayAssignee: Ben Eli <belimele>
Status: CLOSED ERRATA QA Contact: Sagi Hirshfeld <shirshfe>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.16CC: belimele, kbg, kramdoss, lmauda, nbecker, odf-bz-bot
Target Milestone: ---Keywords: Automation
Target Release: ODF 4.16.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.16.0-118 Doc Type: Enhancement
Doc Text:
The log-based replication optimazation also supports object prefix filtering.
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-17 13:23:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2260844    

Comment 5 Sunil Kumar Acharya 2024-06-06 07:34:46 UTC
Please update the RDT flag/text appropriately.

Comment 7 Sagi Hirshfeld 2024-06-11 08:55:08 UTC
Verified the fix on 4.16.0-120.

Exact versions:
---------------
OCP: 4.16.0-0.nightly-2024-06-07-024651
ODF: 4.16.0-120
noobaa core: 5.16.0-1d8127c
noobaa operator: 5.16.0-705652b55ddaabc6bbdf16cb648c4f9a72345cf1
noobaa cli: 5.16.0


Steps taken:
------------
The following steps via OCS-CI automation upload mockup logs to the logs bucket for faster responses:

1. Setup log-based replication with deletion sync between two buckets
2. Patch the policy to sync only a specific prefix
3. Upload objects to two prefixes - one that should be synced and one that shouldn't
4. Wait for the objects under the synced prefix to be replicated
5. Make sure that the objects under the other prefix were not replicated
6. Copy the objects that were not deleted to the same prefix on the target bucket
7. Delete all the objects on both prefixes from the source bucket
8. Wait for the objects with the prefix to be deleted from the target bucket
9. Make sure the objects without the prefix were not deleted from the target bucket

The OCS-CI test in question: https://github.com/sagihirshfeld/ocs-ci/blob/3efc00695446ce85e48d9e416c324569a980f621/tests/functional/object/mcg/test_log_based_bucket_replication.py#L123-L195


Results:
--------
Only the specified prefix was synced, as expected.

Comment 8 Sunil Kumar Acharya 2024-06-18 06:45:26 UTC
Please update the RDT flag/text appropriately.

Comment 10 errata-xmlrpc 2024-07-17 13:23:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat OpenShift Data Foundation 4.16.0 security, enhancement & bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2024:4591