]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
DaemonServer.cc: fix config show command for RGW daemons 55077/head
authorAishwarya Mathuria <amathuri@redhat.com>
Tue, 6 Sep 2022 14:10:43 +0000 (19:40 +0530)
committerAishwarya Mathuria <amathuri@redhat.com>
Mon, 8 Jan 2024 03:44:47 +0000 (09:14 +0530)
commit505f4b7b627814cf5dd73e9a3f2e331770e6c185
tree7cc7fcab961f135930ce78de14de8e7c6fcb00c3
parent03e172495d81c813acb1526ebb6e0224023370c8
DaemonServer.cc: fix config show command for RGW daemons

RGW daemons register in the servicemap by gid which allows multiple radosgw instances to share an auth key/identity. The daemon name is sent as part of the metadata.  (https://github.com/ceph/ceph/commit/84c265238b796935b3aa66d191593b2e8655f384).
All other daemons register by the daemon name and the manager stores all daemon state information with daemon name as key. The 'config show' command looks up the daemon_state map with the daemon name the user mentions as key (for example: 'osd.0', 'client.rgw', 'mon.a').
Due to the change in RGW daemon registration, the key used for storing daemon state has become rgw.gid and 'config show client.rgw' no longer works.

This change will take care of going through the daemon metadata to look for the RGW daemon name when a user enters the config show command for a RGW daemon. Once the correct daemon is found, we retrieve the corresponding daemon key (rgw.gid) and use that to query the daemon_state map.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2011756
Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
(cherry picked from commit b88cecdc7c3dc048550f634ecadc04f661f0fabc)
qa/suites/rados/singleton/all/mon-config.yaml
qa/workunits/mon/config.sh
src/mgr/DaemonServer.cc