]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephadm: remove fsid dir before bootstrap in test_cephadm.sh 48101/head
authorAdam King <adking@redhat.com>
Wed, 24 Aug 2022 19:13:15 +0000 (15:13 -0400)
committerAdam King <adking@redhat.com>
Wed, 14 Sep 2022 19:56:45 +0000 (15:56 -0400)
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)

qa/workunits/cephadm/test_cephadm.sh

index df463cb50bbbd5fde46b040aed9f9f5df2c30ece..6239d29345730260538ca75da11fea823399b76c 100755 (executable)
@@ -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/<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`