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

Stepdown thread should error if mongod process exits abnormally on shutdown

    • Server Tooling & Methods
    • 16

      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).

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: