From 4d905d5d29b018d6019b1432c5db2969efbabf99 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 18 Sep 2018 08:57:25 -0500 Subject: [PATCH] qa/workunits/mon/caps.sh: wait longer to time out 5s -> 5m to gives us more leeway for when the mons are thrashing. Also, *only* set this timeout when we expect a timeout. If we don't, wait forever. Signed-off-by: Sage Weil --- qa/workunits/mon/caps.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/qa/workunits/mon/caps.sh b/qa/workunits/mon/caps.sh index 5d4c130e4ecb3..c5db5650031a2 100755 --- a/qa/workunits/mon/caps.sh +++ b/qa/workunits/mon/caps.sh @@ -14,12 +14,6 @@ else ETIMEDOUT=110 fi -# monitor drops the subscribe message from client if it does not have enough caps -# for read from mon. in that case, the client will be waiting for mgrmap in vain, -# if it is instructed to send a command to mgr. "pg dump" is served by mgr. so, -# we need to set a timeout for testing this scenario. -export CEPH_ARGS='--rados-mon-op-timeout=5' - expect() { cmd=$1 @@ -49,7 +43,17 @@ expect "ceph -k $tmp.foo.keyring --user foo auth ls" 0 expect "ceph -k $tmp.foo.keyring --user foo auth export" 13 expect "ceph -k $tmp.foo.keyring --user foo auth del client.bazar" 13 expect "ceph -k $tmp.foo.keyring --user foo osd dump" 13 + +# monitor drops the subscribe message from client if it does not have enough caps +# for read from mon. in that case, the client will be waiting for mgrmap in vain, +# if it is instructed to send a command to mgr. "pg dump" is served by mgr. so, +# we need to set a timeout for testing this scenario. +# +# leave plenty of time here because the mons might be thrashing. +export CEPH_ARGS='--rados-mon-op-timeout=300' expect "ceph -k $tmp.foo.keyring --user foo pg dump" $ETIMEDOUT +export CEPH_ARGS='' + expect "ceph -k $tmp.foo.keyring --user foo quorum_status" 13 ceph auth del client.foo @@ -60,7 +64,12 @@ expect "ceph -k $tmp.bar.keyring --user bar auth ls" 13 expect "ceph -k $tmp.bar.keyring --user bar auth export" 13 expect "ceph -k $tmp.bar.keyring --user bar auth del client.foo" 13 expect "ceph -k $tmp.bar.keyring --user bar osd dump" 13 + +# again, we'll need to timeout. +export CEPH_ARGS='--rados-mon-op-timeout=300' expect "ceph -k $tmp.bar.keyring --user bar pg dump" $ETIMEDOUT +export CEPH_ARGS='' + expect "ceph -k $tmp.bar.keyring --user bar quorum_status" 13 ceph auth del client.bar -- 2.39.5