]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/rgw: include message field in reported errors
authorAdam King <adking@redhat.com>
Mon, 14 Apr 2025 20:57:30 +0000 (16:57 -0400)
committerAdam King <adking@redhat.com>
Mon, 5 May 2025 17:24:38 +0000 (13:24 -0400)
commit61e2b24b467beea2b38ab9c16f6ecc72987b830e
treec40b9bb9b051f7238dc082463fa0642261300a57
parentf733a87f4d8f08ce15c541ff6e06a905772b323f
mgr/rgw: include message field in reported errors

This is in response to trying to debug

```
[ceph: root@vm-00 /]# ceph rgw realm bootstrap -i specs/rgw.yaml
Error EEXIST:
```

The lack of useful information in the error message made this
more difficult than it needed to be. With this patch, the
same error now gives

```
[ceph: root@vm-00 /]# ceph rgw realm bootstrap -i specs/rgw.yaml
failed to create system user: Command error (-17): user create --uid sysuser-my_realm_ck
--display-name sysuser-my_realm_ck --system --rgw-zonegroup my_zonegroup_ck --zonegroup-id
428a28d1-c8a9-4c12-a408-29507ef23842 --rgw-zone my_zone_ck --zone-id 161ee2ab-bc96-4729-a2b5-0d170e347129
stdout:
stderr:could not create user: unable to parse parameters, user: sysuser-my_realm_ck exists
Error EEXIST:
```

which is a bit more verbose than is maybe needed, but at least
gives you actual hints as to what went wrong

Signed-off-by: Adam King <adking@redhat.com>
src/pybind/mgr/rgw/module.py