]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr: enhance the rados service
authorXiubo Li <xiubli@redhat.com>
Thu, 4 Feb 2021 06:14:13 +0000 (14:14 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 16 Mar 2021 04:27:13 +0000 (12:27 +0800)
commita968f65d784b3d6c6a172929aa293f09e6917fa6
tree36f2ab82f9d421ebdfd13e6f7cd261aab7b8997b
parent5415d96044e9c2ed8e4de191a446aa2948d3c5f5
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>
src/mgr/ServiceMap.cc
src/test/librados/service.cc