]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_ceph_daemon: test unit, enter, shell
authorSage Weil <sage@redhat.com>
Wed, 23 Oct 2019 16:34:46 +0000 (11:34 -0500)
committerSage Weil <sage@redhat.com>
Wed, 23 Oct 2019 20:08:55 +0000 (15:08 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
qa/standalone/test_ceph_daemon.sh

index db624424e8067aa300e0532a577f19ef93c4bbdc..444c005b652797067204f44c24b029c85fd7b33a 100755 (executable)
@@ -112,10 +112,31 @@ $SUDO $CEPH_DAEMON shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \
     | jq '.mgrmap.num_standbys' | grep -q 1
 
 ## run
+# WRITE ME
+
+## adopt
+# WRITE ME
+
+## unit
+$SUDO $CEPH_DAEMON unit --fsid $FSID --name mon.a -- is-enabled
+$SUDO $CEPH_DAEMON unit --fsid $FSID --name mon.a -- is-active
+expect_false $SUDO $CEPH_DAEMON unit --fsid $FSID --name mon.xyz -- is-active
+$SUDO $CEPH_DAEMON unit --fsid $FSID --name mon.a -- disable
+expect_false $SUDO $CEPH_DAEMON unit --fsid $FSID --name mon.a -- is-enabled
+$SUDO $CEPH_DAEMON unit --fsid $FSID --name mon.a -- enable
+$SUDO $CEPH_DAEMON unit --fsid $FSID --name mon.a -- is-enabled
+
 ## shell
+$SUDO $CEPH_DAEMON --image $IMAGE shell -- true
+$SUDO $CEPH_DAEMON --image $IMAGE shell --fsid $FSID -- test -d /var/log/ceph
+
 ## enter
-## unit
-## adopt
+expect_false $SUDO $CEPH_DAEMON enter
+$SUDO $CEPH_DAEMON enter --fsid $FSID --name mon.a -- test -d /var/lib/ceph/mon/ceph-a
+$SUDO $CEPH_DAEMON enter --fsid $FSID --name mgr.x -- test -d /var/lib/ceph/mgr/ceph-x
+$SUDO $CEPH_DAEMON enter --fsid $FSID --name mon.a -- pidof ceph-mon
+expect_false $SUDO $CEPH_DAEMON enter --fsid $FSID --name mgr.x -- pidof ceph-mon
+$SUDO $CEPH_DAEMON enter --fsid $FSID --name mgr.x -- pidof ceph-mgr
 
 ## ceph-volume
 $SUDO $CEPH_DAEMON --image $IMAGE ceph-volume --fsid $FSID -- inventory --format=json \