]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cstart.sh: compile cephadm
authorMichael Fritch <mfritch@suse.com>
Thu, 18 Nov 2021 23:33:29 +0000 (16:33 -0700)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 13 Sep 2022 16:17:20 +0000 (12:17 -0400)
update cstart/ckill scripts to use the compiled cephadm binary

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/ckill.sh
src/cstart.sh

index 32251556f1920afdbe19f7ea82c7d71218aa6c7d..593aad471d4711e4930498d59b1a8b4c147d40c4 100755 (executable)
@@ -1,5 +1,13 @@
 #!/bin/bash -e
 
+if [ -e CMakeCache.txt ]; then
+    [ -z "$CEPH_BIN" ] && CEPH_BIN=bin
+fi
+
+if [ -z "$CEPHADM" ]; then
+    CEPHADM="${CEPH_BIN}/cephadm"
+fi
+
 # fsid
 if [ -e fsid ] ; then
     fsid=`cat fsid`
@@ -9,5 +17,5 @@ else
 fi
 echo "fsid $fsid"
 
-sudo ../src/cephadm/cephadm rm-cluster --force --fsid $fsid
+sudo $CEPHADM rm-cluster --force --fsid $fsid
 
index ca76c789ca3b1a4c9fe9dbdd2089c62dcb333332..1b958df536f5143defd77f9a63c9925a5359a092 100755 (executable)
@@ -1,5 +1,13 @@
 #!/bin/bash -e
 
+if [ -e CMakeCache.txt ]; then
+    [ -z "$CEPH_BIN" ] && CEPH_BIN=bin
+fi
+
+if [ -z "$CEPHADM" ]; then
+    CEPHADM="${CEPH_BIN}/cephadm"
+fi
+
 image_base="quay.io/ceph-ci/ceph"
 
 if which podman 2>&1 > /dev/null; then
@@ -55,8 +63,8 @@ if ! sudo $runtime image inspect $image_base:$shortid 1>/dev/null 2>/dev/null; t
     sudo ../src/script/cpatch -t $image_base:$shortid
 fi
 
-sudo ../src/cephadm/cephadm rm-cluster --force --fsid $fsid
-sudo ../src/cephadm/cephadm --image ${image_base}:${shortid} bootstrap \
+sudo $CEPHADM rm-cluster --force --fsid $fsid
+sudo $CEPHADM --image ${image_base}:${shortid} bootstrap \
      --skip-pull \
      --fsid $fsid \
      --mon-addrv "[v2:$ip:$port]" \
@@ -69,7 +77,7 @@ sudo chmod 755 ceph.client.admin.keyring
 echo 'keyring = ceph.client.admin.keyring' >> ceph.conf
 
 # don't use repo digests; this implicitly does a pull and we don't want that
-bin/ceph config set mgr mgr/cephadm/use_repo_digest false
+${CEPH_BIN}/ceph config set mgr mgr/cephadm/use_repo_digest false
 
 echo
 echo "sudo ../src/script/cpatch -t $image_base:$shortid"