]> 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>
Thu, 24 Jul 2025 15:08:57 +0000 (11:08 -0400)
commitd61095d97921042eb05bd9354a50b223f0ee0c58
tree07eac0eee4fef3c6ad5a6ed23b65da181453bbaa
parentc6cc3847a7d9f5104af33a88997b2d29985b842e
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>
(cherry picked from commit 61e2b24b467beea2b38ab9c16f6ecc72987b830e)
src/pybind/mgr/rgw/module.py