]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd: extend use of "none" placeholder to IMAGES section
authorIlya Dryomov <idryomov@gmail.com>
Thu, 20 Mar 2025 16:10:47 +0000 (17:10 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 26 Mar 2025 15:20:12 +0000 (16:20 +0100)
commit95fc1f809cb5f76d30d3d14a20787f7499d57080
tree7bd9a84c7ffd34a10907ae70d61ce496014dbae3
parent3616888962bfd4119a24b5166d9b83acbcf6659a
rbd: extend use of "none" placeholder to IMAGES section

Currently if there are no mirror-enabled images, IMAGES section
in "rbd mirror pool status --verbose" output isn't terminated:

  $ rbd mirror pool status data --verbose
  health: OK
  daemon health: OK
  image health: OK
  images: 0 total

  DAEMONS
  service 4388:
    ...
    health: OK

  IMAGES$

DAEMONS section has a "none" placeholder for when there are no
rbd-mirror daemons running.  Fix some issues with the separator logic
and employ the placeholder in IMAGES section:

  $ rbd mirror pool status data --verbose
  health: OK
  daemon health: OK
  image health: OK
  images: 0 total

  DAEMONS
  service 4388:
    ...
    health: OK

  IMAGES
    none
  $

  $ rbd mirror pool status data --verbose
  health: UNKNOWN
  daemon health: UNKNOWN
  image health: OK
  images: 0 total

  DAEMONS
    none

  IMAGES
    none
  $

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/tools/rbd/action/MirrorPool.cc