This changes the behavior of clean shutdown.
Probably most noticeable for users, a shutdown initiated by SIGTERM will now attempt a step down in a way very similar to the shutdown command without arguments. It differs in that:
- Where a default shutdown command would have failed, returning to the user with an error, failing to stepdown will not stop shutdown in this path.
- The node will not vote in elections that occur after the step down
Kubernetes uses SIGTERM to spin down containers, and our sysv init and systemd unit files use SIGTERM to shutdown the mongodb service. It would greatly reduce election time and prevent potential data loss due to replicaset rollback if we were able to use the election handoff path of stepdown instead of waiting for the full electionTimeoutMillis.