Bug 2344993 - [rgw][server-access-logging]: radosgw-admin bucket logging flush command is returning next log object name instead of current log object name
Summary: [rgw][server-access-logging]: radosgw-admin bucket logging flush command is r...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 8.1
Assignee: Yuval Lifshitz
QA Contact: Hemanth Sai
Rivka Pollack
URL:
Whiteboard:
Depends On:
Blocks: 2351689
TreeView+ depends on / blocked
 
Reported: 2025-02-11 18:27 UTC by Hemanth Sai
Modified: 2025-06-04 18:00 UTC (History)
6 users (show)

Fixed In Version: ceph-19.2.1-80.el9cp
Doc Type: Bug Fix
Doc Text:
.The `radosgw-admin bucket logging flush` command now provides works as expected Previously, using the `radosgw-admin bucket logging flush` command would return the next lob object name. As a result, the user did not know the name of the log object that was flushed without listing the log bucket. With this fix, the correct name of the object that was flushed is now returned as expected.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-10592 0 None None None 2025-02-11 18:28:13 UTC

Description Hemanth Sai 2025-02-11 18:27:08 UTC
Description of problem:
The log object name that is returned by the radosgw-admin bucket logging flush command and the log object that is actually delivered to the target bucket is not the same.
The command is actually returning the next log object name instead of current object name
we can also observe that the log object name that is delivered currently to the target bucket contains timestamp that is equal to previous log object delivered time



log snippet:

[root@magna016 ~]# aws --endpoint-url http://10.8.128.16:81 --profile hsm s3 cp obj1_4KB s3://src-bkt10/obj6
upload: ./obj1_4KB to s3://src-bkt10/obj6                      
[root@magna016 ~]# 
[root@magna016 ~]# radosgw-admin bucket logging flush --bucket src-bkt10
flushed pending logging object 'src-bkt10-logs2025-02-10-18-14-49-4BQC4NF8OAMC5WXU' to target bucket 'dest-bkt10'
[root@magna016 ~]# 
[root@magna016 ~]# 
[root@magna016 ~]# aws --endpoint-url http://10.8.128.16:81 --profile hsm s3 ls s3://dest-bkt10
2025-02-10 18:14:49        103 src-bkt10-logs2025-02-10-18-14-41-VEAOHMMF60OVY6RS
[root@magna016 ~]# 
[root@magna016 ~]# 
[root@magna016 ~]# aws --endpoint-url http://10.8.128.16:81 --profile hsm s3 cp obj1_4KB s3://src-bkt10/obj7
upload: ./obj1_4KB to s3://src-bkt10/obj7                      
[root@magna016 ~]# 
[root@magna016 ~]# radosgw-admin bucket logging flush --bucket src-bkt10
flushed pending logging object 'src-bkt10-logs2025-02-10-18-16-10-PAX5MDPUOVE0SUI9' to target bucket 'dest-bkt10'
[root@magna016 ~]# 
[root@magna016 ~]# 
[root@magna016 ~]# aws --endpoint-url http://10.8.128.16:81 --profile hsm s3 ls s3://dest-bkt10
2025-02-10 18:14:49        103 src-bkt10-logs2025-02-10-18-14-41-VEAOHMMF60OVY6RS
2025-02-10 18:16:10        103 src-bkt10-logs2025-02-10-18-14-49-4BQC4NF8OAMC5WXU
[root@magna016 ~]# 
[root@magna016 ~]# 
[root@magna016 ~]# aws --endpoint-url http://10.8.128.16:81 --profile hsm s3 cp obj1_4KB s3://src-bkt10/obj8
upload: ./obj1_4KB to s3://src-bkt10/obj8                      
[root@magna016 ~]# 
[root@magna016 ~]# radosgw-admin bucket logging flush --bucket src-bkt10
flushed pending logging object 'src-bkt10-logs2025-02-10-18-16-48-5238891NCD2YP6WQ' to target bucket 'dest-bkt10'
[root@magna016 ~]# 
[root@magna016 ~]# aws --endpoint-url http://10.8.128.16:81 --profile hsm s3 ls s3://dest-bkt10
2025-02-10 18:14:49        103 src-bkt10-logs2025-02-10-18-14-41-VEAOHMMF60OVY6RS
2025-02-10 18:16:10        103 src-bkt10-logs2025-02-10-18-14-49-4BQC4NF8OAMC5WXU
2025-02-10 18:16:48        103 src-bkt10-logs2025-02-10-18-16-10-PAX5MDPUOVE0SUI9
[root@magna016 ~]# 


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

How reproducible:
always

Steps to Reproduce:
1.create a bucket
2.put-bucket-logging on the bucket
3.upload few objects and flush the log using below command. we observe that the log object name that is returned by the command and the log object that is actually delivered to the target bucket is not the same. infact the log object name that is delivered by command is actually the next log object name.
[root@magna016 ~]# radosgw-admin bucket logging flush --bucket src-bkt10
flushed pending logging object 'src-bkt10-logs2025-02-10-18-14-49-4BQC4NF8OAMC5WXU' to target bucket 'dest-bkt10'
[root@magna016 ~]#



Actual results:
radosgw-admin bucket logging flush is not returning the current log object name instead it is returning next log object name.

Expected results:
expected the log object name that the command returns and the actual log object delivered is the same.

Additional info:
captured the log output in this doc:
https://docs.google.com/document/d/1dsPIVFUt6sEjYYAKoyyvmAA14cW2vkHUW9akJIhNOQU/edit?usp=sharing


Note You need to log in before you can comment on or make changes to this bug.