From: Sage Weil Date: Sat, 12 Sep 2015 17:51:13 +0000 (-0400) Subject: qa/workunits/cephtool/test.sh: make mds epoch check more tolerant X-Git-Tag: v9.1.0~146^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4a5a5b3705b636131c6942c255787f4e950859f0;p=ceph.git qa/workunits/cephtool/test.sh: make mds epoch check more tolerant This can race with an actual mdsmap epoch update for some other reason. We just need to make sure the epoch *increased*, not that it is exactly old + 1. Fixes: #12991 Signed-off-by: Sage Weil --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 1ba1efee73583..9ca1727d4e793 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -748,8 +748,15 @@ function test_mon_mds() mdsmapfile=$TMPDIR/mdsmap.$$ current_epoch=$(ceph mds getmap -o $mdsmapfile --no-log-to-stderr 2>&1 | grep epoch | sed 's/.*epoch //') [ -s $mdsmapfile ] + # make several attempts in case we race with another mdsmap update ((epoch = current_epoch + 1)) - ceph mds setmap -i $mdsmapfile $epoch + ((epoch2 = current_epoch + 2)) + ((epoch3 = current_epoch + 3)) + ((epoch4 = current_epoch + 4)) + ceph mds setmap -i $mdsmapfile $epoch || \ + ceph mds setmap -i $mdsmapfile $epoch2 || \ + ceph mds setmap -i $mdsmapfile $epoch3 || \ + ceph mds setmap -i $mdsmapfile $epoch4 rm $mdsmapfile ceph osd pool create data2 10