Bug 2360666

Summary: [8.1][rgw][server-access-logging]: radosgw-admin bucket logging flush command is failing if the logging policy contains a tenanted bucket as TargetBucket
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Hemanth Sai <hmaheswa>
Component: RGWAssignee: Yuval Lifshitz <ylifshit>
Status: CLOSED ERRATA QA Contact: Hemanth Sai <hmaheswa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.1CC: ceph-eng-bugs, cephqe-warriors, mbenjamin, tserlin, ylifshit
Target Milestone: ---   
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-19.2.1-163.el9cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-26 12:30:41 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:

Description Hemanth Sai 2025-04-17 09:45:58 UTC
Description of problem:
radosgw-admin bucket logging flush command is failing if the logging policy contains a tenanted bucket as Target Bucket
but awscli post-bucket-logging is working properly for tenanted buckets as well


[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ radosgw-admin bucket logging info --bucket tenant1/t1u1-src-bkt1
{
    "bucketLoggingStatus": {
        "loggingEnabled": {
            "targetBucket": "tenant1:t1u1-dest-bkt1",
            "targetPrefix": "t1u1-src-bkt1-logs-",
            "objectRollTime": 300,
            "loggingType": "Journal",
            "recordsBatchSize": 0,
            "targetObjectKeyFormat": {
                "simplePrefix": {}
            }
        }
    }
}
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ 
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ radosgw-admin bucket logging flush --bucket tenant1/t1u1-src-bkt1
ERROR: failed to get target logging bucket 'tenant1:t1u1-dest-bkt1'
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ 

[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ aws --endpoint-url http://10.0.64.13:80 --profile t1u1 s3 ls s3://t1u1-dest-bkt1
2025-04-10 17:17:56        327 t1u1-src-bkt1-logs-2025-04-10-17-05-29-J2N2L6HWJVMLYTP7
2025-04-10 17:22:56      15992 t1u1-src-bkt1-logs-2025-04-10-17-17-56-3XJUF1J9T0NJ9STW
2025-04-10 17:34:49       5984 t1u1-src-bkt1-logs-2025-04-10-17-22-56-QGFYKK9IU8OYVP8O
2025-04-10 17:40:44         95 t1u1-src-bkt1-logs-2025-04-10-17-34-49-XTRAE0C60SXD0JPN
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ 
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ aws --endpoint-url http://10.0.64.13:80 --profile t1u1 s3 cp obj10MB s3://t1u1-src-bkt1/obj6
upload: ./obj10MB to s3://t1u1-src-bkt1/obj6                     
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ 
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ aws --endpoint-url http://10.0.64.13:80 --profile t1u1 s3api post-bucket-logging --bucket t1u1-src-bkt1
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ 
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ aws --endpoint-url http://10.0.64.13:80 --profile t1u1 s3 ls s3://t1u1-dest-bkt1
2025-04-10 17:17:56        327 t1u1-src-bkt1-logs-2025-04-10-17-05-29-J2N2L6HWJVMLYTP7
2025-04-10 17:22:56      15992 t1u1-src-bkt1-logs-2025-04-10-17-17-56-3XJUF1J9T0NJ9STW
2025-04-10 17:34:49       5984 t1u1-src-bkt1-logs-2025-04-10-17-22-56-QGFYKK9IU8OYVP8O
2025-04-10 17:40:44         95 t1u1-src-bkt1-logs-2025-04-10-17-34-49-XTRAE0C60SXD0JPN
2025-04-10 17:56:38         95 t1u1-src-bkt1-logs-2025-04-10-17-56-26-OVF5MQ63XEEGOXNY
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ 
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ aws --endpoint-url http://10.0.64.13:80 --profile t1u1 s3 cp s3://t1u1-dest-bkt1/t1u1-src-bkt1-logs-2025-04-10-17-56-26-OVF5MQ63XEEGOXNY -
tenant1$t1user1 tenant1:t1u1-src-bkt1 [10/Apr/2025:17:56:26 +0000] REST.POST.UPLOAD obj6 - - -
[cephuser@ceph-pri-hsm-scale-zdabo4-node6 ~]$ 



Version-Release number of selected component (if applicable):
ceph version 19.2.1-107.el9cp

How reproducible:
always

Steps to Reproduce:
1.create two buckets(src and dest). dest bucket should be under tenanted user
2.put-bucket-logging on the src bucket
3.perform few operations on the bucket, and execute radosgw-admin bucket logging flush command on the src bucket.

Actual results:
radosgw-admin bucket logging flush command is failing if the logging policy contains a tenanted bucket as Target Bucket

Expected results:
Expected radosgw-admin bucket logging flush command should pass for tenanted buckets as well as Target Bucket

Additional info:

Comment 7 errata-xmlrpc 2025-06-26 12:30:41 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 Ceph Storage 8.1 security, bug fix, and enhancement updates), 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-2025:9775