The shell commands we test beforehand can create the
/var/lib/ceph/
00000000-0000-0000-0000-
0000deadbeef directory
and that directory being present will block bootstrap as
it will think a cluster with this fsid alreayd exists
Fixes: https://tracker.ceph.com/issues/57290
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit
7c825da44aee1245e8a17bcdc37512c226463bcf)
# test stdin
echo foo | $CEPHADM shell -- cat | grep -q foo
+# the shell commands a bit above this seems to cause the
+# /var/lib/ceph/<fsid> directory to be made. Since we now
+# check in bootstrap that there are no clusters with the same
+# fsid based on the directory existing, we need to make sure
+# this directory is gone before bootstrapping. We can
+# accomplish this with another rm-cluster
+$CEPHADM rm-cluster --fsid $FSID --force
+
## bootstrap
ORIG_CONFIG=`mktemp -p $TMPDIR`
CONFIG=`mktemp -p $TMPDIR`