Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39359

Stepdown thread should error if mongod process exits abnormally on shutdown

    XMLWordPrintable

    Details

    • Linked BF Score:
      16

      Description

      The Python version of the stepdown thread in resmoke.py has a mode where it'll send a SIGTERM to the current primary in order to exercise the clean shutdown and startup recovery codepaths of replication. There's already logic to have the stepdown thread exit (and thus later cause the test to be marked as having failed) if a mongod process within the replica set has already exited abnormally when trying to step down the current primary.

      However, the return code from calling primary.mongod.wait() after signaling the current primary to exit is ignored. We should instead raise an errors.ServerFailure exception if after sending a SIGTERM to the mongod process it exited with a non-zero return code. Note that we'll still want to ignore the non-zero return code that's expected after sending a SIGKILL to the mongod process (as happens in the replica_sets_kill_primary_jscore_passthrough.yml test suite).

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: