ceph/qa/suites/orch/cephadm/osds/2-ops/rm-zap-flag.yaml
Cory Snyder ea507d6c86 mgr/orchestrator: add --zap flag to 'orch osd rm'
Adds the ability to zap OSD devices after removal, implemented as a flag
on the 'orch osd rm' command.

Fixes: https://tracker.ceph.com/issues/43692
Signed-off-by: Cory Snyder <csnyder@iland.com>
2021-10-26 09:48:32 -04:00

16 lines
571 B
YAML

tasks:
- cephadm.shell:
host.a:
- |
set -e
set -x
ceph orch ps
ceph orch device ls
DEVID=$(ceph device ls | grep osd.1 | awk '{print $1}')
HOST=$(ceph orch device ls | grep "$DEVID" | awk '{print $1}')
DEV=$(ceph orch device ls | grep "$DEVID" | awk '{print $2}')
echo "host $HOST, dev $DEV, devid $DEVID"
ceph orch osd rm --zap --replace 1
while ceph orch osd rm status | grep ^1 ; do sleep 5 ; done
while ! ceph osd dump | grep osd.1 | grep "up\s*in" ; do sleep 5 ; done