Bug 2089220

Summary: [rfe] translate radosgw-admin 2002 to ENOENT (POSIX); was: radosgw-admin bucket stats returns Unknown error 2002
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Francois Andrieu <fandrieu>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED ERRATA QA Contact: Anuchaithra <anrao>
Severity: high Docs Contact: Akash Raj <akraj>
Priority: unspecified    
Version: 4.3CC: akraj, anarnold, anrao, cbodley, ceph-eng-bugs, gjose, jansingh, kbader, kkeithle, mbenjamin, mhackett, rmandyam, tserlin, uboppana, vimishra, vumrao
Target Milestone: ---Keywords: FutureFeature
Target Release: 5.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-16.2.10-6.el8cp Doc Type: Enhancement
Doc Text:
.Result code 2002 of `radosgw-admin` commands is explicitly translated to 2 Previously, a change in the S3 error translation of internal `NoSuchBucket` result inadvertently changed the error code from the `radosgw-admin bucket stats` command, causing the programs checking the shell result code of those `radosgw-admin` commands to see a different result code. With this fix, the result code 2002 is explicitly translated to 2 and users can see the original behaviour.
Story Points: ---
Clone Of:
: 2100966 2100967 (view as bug list) Environment:
Last Closed: 2023-01-11 17:39:46 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: 2100966, 2100967, 2126049    

Description Francois Andrieu 2022-05-23 09:15:17 UTC
Description of problem:
With the latest z-stream release of 4.3, the return code on radosgw-admin bucket stats changed from 2 (ENOENT) to 210 (unknown)

Version-Release number of selected component (if applicable):
ceph version 14.2.22-110.el8cp (2e0d97dbe192cca7419bbf3f8ee6b7abb42965c4) nautilus (stable)


How reproducible:
Everytime

Steps to Reproduce:
1. $ radosgw-admin bucket stats --bucket=xxx


Actual results:
failure: (2002) Unknown error 2002:
2022-05-17 12:21:11.822 7f40e28c3e00  0 could not get bucket info for bucket=xxx
$ echo $?
210


Expected results:
failure: (2) No such file or directory:
2022-05-17 14:41:12.275366 7f40e28c3e00  0 could not get bucket info for bucket=xxx
$ echo $?
2

Additional info:
It seems like this behavior was introduced with this PR https://github.com/ceph/ceph/pull/44413 in an attempt to fix https://tracker.ceph.com/issues/45193 that came with Mimic, but didn't impact radosgw-admin command at this time since the return code remains unchanged until now. That let me think the new RC change is unintentional and can be considered a regression:

$ radosgw-admin --version
ceph version 12.2.12-127.el7cp (149c9c8a16ac33a42231ce4145067d3ceec16ac7) luminous (stable)

$ radosgw-admin bucket stats --bucket=xxx
failure: (2) No such file or directory:
2022-05-23 10:33:26.715 7fad608f21c0  0 could not get bucket info for bucket=xxx
$ echo $?
2

Comment 1 RHEL Program Management 2022-05-23 09:15:23 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 41 errata-xmlrpc 2023-01-11 17:39:46 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 (Moderate: Red Hat Ceph Storage 5.3 security update and Bug Fix), 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-2023:0076

Comment 42 Red Hat Bugzilla 2023-09-18 04:37:39 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days