qa/suites/orch/cephadm/smoke-roleless: test taking ganeshas offline

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2021-08-05 14:41:20 -04:00
parent 3c1e086be0
commit a5e8227a83

View File

@ -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