From 7c825da44aee1245e8a17bcdc37512c226463bcf Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 24 Aug 2022 15:13:15 -0400 Subject: [PATCH] qa/cephadm: remove fsid dir before bootstrap in test_cephadm.sh 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 --- qa/workunits/cephadm/test_cephadm.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qa/workunits/cephadm/test_cephadm.sh b/qa/workunits/cephadm/test_cephadm.sh index fdddf6e03d7..96fcf76d7be 100755 --- a/qa/workunits/cephadm/test_cephadm.sh +++ b/qa/workunits/cephadm/test_cephadm.sh @@ -180,6 +180,14 @@ $CEPHADM shell --fsid $FSID -e FOO=BAR -- printenv | grep FOO=BAR # test stdin echo foo | $CEPHADM shell -- cat | grep -q foo +# the shell commands a bit above this seems to cause the +# /var/lib/ceph/ 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`