Skip to content

Commit 314bd7d

Browse files
committed
ORION-237122: retry destroy_session if got NFS4ERR_BACK_CHAN_BUSY
1 parent a298fa2 commit 314bd7d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

nfs4.1/server41tests/environment.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,20 @@ def testname(self, t):
258258

259259
def clean_sessions(self):
260260
"""Destroy client name env.c1"""
261+
262+
MAX_NUM_RETRIES = 30
261263
for sessionid in list(self.c1.sessions):
262-
self.c1.compound([op.destroy_session(sessionid)])
263-
del(self.c1.sessions[sessionid])
264+
retry_count = 0
265+
while retry_count < MAX_NUM_RETRIES:
266+
res = self.c1.compound([op.destroy_session(sessionid)])
267+
if res.status != NFS4ERR_BACK_CHAN_BUSY:
268+
break
269+
270+
# backchannel still busy, wait a bit to retry
271+
time.sleep(0.1)
272+
retry_count += 1
273+
274+
del self.c1.sessions[sessionid]
264275

265276
def clean_clients(self):
266277
"""Destroy client name env.c1"""

0 commit comments

Comments
 (0)