The test relies on the fact that
'ceph-volume lvm list' returns a nonzero
rc when there are no lvm OSDs present
```
root@smithi156:/# ceph-volume lvm list
No valid Ceph lvm devices found
root@smithi156:/# echo $?
1
```
with lvm OSDs present, it will instead
reports on the lvs and give a zero rc
```
root@smithi097:/# ceph-volume lvm list
====== osd.0 =======
[block] /dev/ceph-
ffeadaf4-...
...
root@smithi097:/# echo $?
0
```
Assuming the override this test has works
properly and all the OSDs we see are raw,
we can use the nonzero rc to confirm the
OSDs ar raw
Signed-off-by: Adam King <adking@redhat.com>
--- /dev/null
+overrides:
+ cephadm:
+ raw-osds: True
+tasks:
+- cephadm.shell:
+ host.a:
+ - |
+ set -e
+ set -x
+ ceph orch ps
+ ceph orch device ls
+ ceph osd tree
+ ORCH_PS=$(ceph orch ps)
+ if grep -q "No daemons" <<< "$ORCH_PS"; then
+ echo "No OSDs were deployed"
+ exit 1
+ fi
+ ceph orch ps | grep -q "running"
+ if grep -q "failed" <<< "$ORCH_PS"; then
+ echo "At least one raw OSD deployed is failed"
+ exit 1
+ fi
+ if grep -q "stopped" <<< "$ORCH_PS"; then
+ echo "At least one raw OSD deployed is stopped"
+ exit 1
+ fi
+ if ceph-volume lvm list; then
+ echo "ceph-volume lvm list was expected to give non-zero rc with all raw OSDs"
+ exit 1
+ fi