]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
monitor: use quorum_status instead of ceph status
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 26 Oct 2020 21:33:45 +0000 (17:33 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 3 Nov 2020 13:32:09 +0000 (14:32 +0100)
commit3bba1fd203ccf10fc9726570f20d875846c827d9
treee686503f35845f0f4b32d05e6c0f501ec725b044
parenta8e2bc087f69a4098cb75086c0a8d5b504e3426a
monitor: use quorum_status instead of ceph status

The ceph status command returns a lot of information stored in variables
and/or facts which could consume resources for nothing.
When checking the quorum status, we're only using the quorum_names
structure in the ceph status output.
To optimize this, we could use the ceph quorum_status command which contains
the same needed information.
This command returns less information.

$ ceph status -f json  | wc -c
2001
$ ceph quorum_status -f json  | wc -c
957
$ time ceph status -f json > /dev/null

real 0m0.577s
user 0m0.538s
sys 0m0.029s
$ time ceph quorum_status -f json > /dev/null

real 0m0.544s
user 0m0.527s
sys 0m0.016s

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 88f91d8c12169e08fc299dbd2fcaecc9d42dedca)
infrastructure-playbooks/cephadm-adopt.yml
infrastructure-playbooks/cephadm.yml
infrastructure-playbooks/rolling_update.yml
infrastructure-playbooks/shrink-mon.yml
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml
roles/ceph-handler/templates/restart_mon_daemon.sh.j2