]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commit
osds: use ceph osd stat instead of ceph status
authorwangxiaotong <wangxiaotong@fiberhome.com>
Sat, 24 Oct 2020 13:59:17 +0000 (21:59 +0800)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 3 Nov 2020 19:38:49 +0000 (14:38 -0500)
commit8bc0806f102b00be57bef92b22833e7f8451efa7
treefcedbe6e3865af962fcd37482f7b191a8d259956
parent61001660bb837d5c87588cab2cc8e8b64a3a8002
osds: use ceph osd stat instead of ceph status

Improve the checked way of the OSD created checking process.
This replaces the ceph status command by the ceph osd stat command.
The osdmap structure isn't needed anymore.

$ ceph status -f json | wc -c
2001
$ ceph osd stat -f json | wc -c
132
$ time ceph status -f json > /dev/null

real    0m0.563s
user    0m0.526s
sys     0m0.036s
$ time ceph osd stat -f json > /dev/null

real 0m0.457s
user 0m0.411s
sys 0m0.045s

Signed-off-by: wangxiaotong <wangxiaotong@fiberhome.com>
(cherry picked from commit b9cb0f12e9e79600f1a974dd88ba1ed1d833211f)
roles/ceph-osd/tasks/main.yml