]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr: store names of modules that register RADOS clients in the MgrMap
authorRamana Raja <rraja@redhat.com>
Mon, 30 Jan 2023 07:21:54 +0000 (02:21 -0500)
committerRamana Raja <rraja@redhat.com>
Tue, 28 Feb 2023 14:20:28 +0000 (09:20 -0500)
commitb545fb9f5660dca3af4dea195ea4555f09b3a6e8
treea2a339e52a157be37158b4ba38dbcf4932400dcc
parent222c3e026987028c7681759227bd01473dc1267f
mgr: store names of modules that register RADOS clients in the MgrMap

The MgrMap stores a list of RADOS clients' addresses registered by the
mgr modules. During failover of ceph-mgr, the list is used to blocklist
clients belonging to the failed ceph-mgr.

Store the names of the mgr modules that registered the RADOS clients
along with the clients' addresses in the MgrMap. During debugging, this
allows easy identification of the mgr module that registered a
particular RADOS client by just dumping the MgrMap (`ceph mgr dump`).

Following is the MgrMap output with a module's client name displayed
along with its client addrvec,
$ ceph mgr dump | jq '.active_clients[0]'
{
  "name": "devicehealth",
  "addrvec": [
    {
      "type": "v2",
      "addr": "10.0.0.148:0",
      "nonce": 612376578
    }
  ]
}

Fixes: https://tracker.ceph.com/issues/58691
Signed-off-by: Ramana Raja <rraja@redhat.com>
PendingReleaseNotes
qa/workunits/cephtool/test.sh
src/messages/MMgrBeacon.h
src/mgr/PyModuleRegistry.h
src/mon/MgrMap.h
src/mon/MgrMonitor.cc