]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr: enhance the rados service
authorXiubo Li <xiubli@redhat.com>
Thu, 4 Feb 2021 06:14:13 +0000 (14:14 +0800)
committerJason Dillaman <dillaman@redhat.com>
Thu, 18 Mar 2021 19:12:55 +0000 (15:12 -0400)
commitd43220738de4656139b61278996564220fa9b420
treef97cf83b6739bd6cb9ece6335b71166058bb02db
parentec2d92abe1779173cf2ed8c822a5722fe52cbaa9
mgr: enhance the rados service

For some use cases, like the tcmu-runner, there maybe handreds or
thousands of LUNs, and then for each LUN it will register one service
daemon, then in the `ceph -s` output will be full of useless info.

This will allow to classify the sevices service daemons in one
specified format by adding two pairs in metadata:

  "daemon_type"   : "${TYPE}"
  "daemon_prefix" : "${PREFIX}"

TYPE: will be used to replace the default "daemon(s)"
showed in `ceph -s`. If absent, the "daemon" will be used.
PREFIX: if present the active members will be classified
by the prefix instead of "daemon_name".

For exmaple for iscsi gateways, it will be something likes:
  "daemon_type"   : "portal"
  "daemon_prefix" : "gw${N}"

Then the `ceph -s` output will be:

  ...
  services:
    mon:   3 daemons, quorum a,b,c (age 50m)
    mgr:   x(active, since 49m)
    mds:   a:1 {0=c=up:active} 2 up:standby
    osd:   3 osds: 3 up (since 49m), 3 in (since 49m)
    iscsi: 8 portals active (gw0, gw1, gw2, gw3, gw4, gw5, gw6, gw7)
  ...

Fixes: https://tracker.ceph.com/issues/49057
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit a968f65d784b3d6c6a172929aa293f09e6917fa6)
src/mgr/ServiceMap.cc
src/test/librados/service.cc