From a5e8227a83c229698af462a18f9548c03c559408 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 5 Aug 2021 14:41:20 -0400 Subject: [PATCH] qa/suites/orch/cephadm/smoke-roleless: test taking ganeshas offline Signed-off-by: Sage Weil --- .../2-services/nfs-ingress2.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml b/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml index 87f83380a1d..6f4331bcfd4 100644 --- a/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml +++ b/qa/suites/orch/cephadm/smoke-roleless/2-services/nfs-ingress2.yaml @@ -48,3 +48,23 @@ tasks: ceph orch daemon start $haproxy while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done done + +# take each ganesha down in turn. +# simulate "failure" by deleting the container +- vip.exec: + all-hosts: + - | + echo "Check with $(hostname) ganesha(s) down..." + for c in `systemctl | grep ceph- | grep @nfs | awk '{print $1}'`; do + cid=`echo $c | sed 's/@/-/'` + id=`echo $c | cut -d @ -f 2 | sed 's/.service$//'` + fsid=`echo $c | cut -d @ -f 1 | cut -d - -f 2-` + echo "Removing daemon $id fsid $fsid..." + sudo $TESTDIR/cephadm rm-daemon --fsid $fsid --name $id + + echo "Waking up cephadm..." + sudo $TESTDIR/cephadm shell -- ceph orch ps --refresh + + while ! timeout 1 cat /mnt/foo/testfile ; do true ; done + echo "Mount is back!" + done -- 2.39.5