diff options
author | Carl Worley <carl.worley@mongodb.com> | 2019-12-30 18:58:37 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-30 18:58:37 +0000 |
commit | c184d4e59b059f0a2bec164e93742231a004e346 (patch) | |
tree | dc4d083c79f9e8912cb255d6910f1ca1eeba44f1 /buildscripts | |
parent | ab469975518fab06d2d9337fe8274ea30bf6f67b (diff) | |
download | mongo-c184d4e59b059f0a2bec164e93742231a004e346.tar.gz |
SERVER-45291 Don't error on correctly-killed mongos fixture
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/resmokelib/testing/fixtures/shardedcluster.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py index bcad8688e86..da1e3f575ab 100644 --- a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py +++ b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py @@ -200,7 +200,8 @@ class ShardedClusterFixture(interface.Fixture): # pylint: disable=too-many-inst self.logger.warning("All members of the sharded cluster were expected to be running, " "but weren't.") - # If we're just killing, shutting down the balancer fails for nonresponsive servers. + # If we're killing to archive data files, stopping the balancer will execute + # server commands that might lead to on-disk changes from the point of failure. if self.enable_balancer and not kill: self.stop_balancer() @@ -446,7 +447,9 @@ class _MongoSFixture(interface.Fixture): self.mongos.stop(kill=kill) exit_code = self.mongos.wait() - if exit_code == 0: + # SIGKILL has an exit code of 9 and Python's subprocess module returns + # negative versions of system calls. + if exit_code == 0 or (exit_code == -9 and kill): self.logger.info("Successfully stopped the mongos on port {:d}".format(self.port)) else: self.logger.warning("Stopped the mongos on port {:d}. " |