diff options
author | Mikhail Shchatko <mikhail.shchatko@mongodb.com> | 2020-04-23 17:11:54 +0300 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-23 16:55:43 +0000 |
commit | 74ac57a2f6ca120294592237d547a665513cc52d (patch) | |
tree | 24f14e265a2a1fffd330b23ce62886aaec68a8d9 /buildscripts | |
parent | 8981010cf5d5a2d529b338880186ed8f51526396 (diff) | |
download | mongo-74ac57a2f6ca120294592237d547a665513cc52d.tar.gz |
SERVER-36960 Stepdown thread should handle AutoReconnect exceptions when executing replSetStepUp
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/resmokelib/testing/hooks/stepdown.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/buildscripts/resmokelib/testing/hooks/stepdown.py b/buildscripts/resmokelib/testing/hooks/stepdown.py index f61d070037e..0d855dec911 100644 --- a/buildscripts/resmokelib/testing/hooks/stepdown.py +++ b/buildscripts/resmokelib/testing/hooks/stepdown.py @@ -563,6 +563,10 @@ class _StepdownThread(threading.Thread): # pylint: disable=too-many-instance-at self.logger.info("Failed to step up the secondary on port %d of replica set '%s'.", chosen.port, rs_fixture.replset_name) secondaries.remove(chosen) + except pymongo.errors.AutoReconnect: + # It is possible for a replSetStepUp to fail with AutoReconnect if that node goes + # into Rollback (which causes it to close any open connections). + pass if self._terminate: self.logger.info("Waiting for the old primary on port %d of replica set '%s' to exit.", |