From 88172ee3ac97e90edd245a983e9cec0e807cdb0a Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Wed, 9 Aug 2023 10:02:30 -0400 Subject: [PATCH] rgw: make error message more friendly on rgw-restore-bucket-index When the bucket referenced cannot be found remind the user that they may need to set realm, zonegroup, and/or zone. This improvement was suggested by Madhavi Kasturi. Signed-off-by: J. Eric Ivancich (cherry picked from commit 89f81216a8d8a959ed6766eaf9e867cc9a6bc391) --- src/rgw/rgw-restore-bucket-index | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw-restore-bucket-index b/src/rgw/rgw-restore-bucket-index index fffd5074dd4..512ca24d9ec 100755 --- a/src/rgw/rgw-restore-bucket-index +++ b/src/rgw/rgw-restore-bucket-index @@ -94,10 +94,10 @@ super_exit() { usage() { >&2 cat << EOF -Usage: $0 -b [-l ] [-p ] [-y] +Usage: $0 -b [-l ] [-p ] [-y] where: - -b Required - name of the bucket to operate on + -b Required - name of the bucket to operate on -l Optional - file containing the output of 'rados ls -p ' -r Optional - specify the realm if not applying to the default realm" -g Optional - specify the zonegroup if not applying to the default zonegroup" @@ -253,8 +253,12 @@ eval "radosgw-admin metadata get bucket:$bucket $debugging_rgwadmin $multisite_s export marker=$(jq -r ".data.bucket.marker" $bkt_entry) export bucket_id=$(jq -r ".data.bucket.bucket_id" $bkt_entry) if [ -z "$marker" -o -z "$bucket_id" ] ;then - echo "ERROR: unable to read entry-point metadata for bucket \"$bucket\"." + echo "ERROR: Unable to read entry-point metadata for bucket \"$bucket\"." + echo " Please make sure that is correct and, if not using" + echo " the defaults, that , , and/or" + echo " are correctly specified." clean + usage exit 1 fi -- 2.47.3