10gen / mongo-orchestration

Apache License 2.0
7 stars 11 forks source link

Improve shutdown procedure #253

Closed ShaneHarvey closed 6 years ago

ShaneHarvey commented 6 years ago

This change fixes the issue described in #248. It does three important things:

  1. Don't call subprocess.wait() without a timeout to avoid waiting forever.
  2. Retry the shutdown command once because the first attempt often fails due to an election on >=4.0.
  3. When the server has already exited (due to a crash, etc..) return early without trying to connect.
ShaneHarvey commented 6 years ago

Testing here: https://evergreen.mongodb.com/version/5b6c6ae9c9ec440182ed4bea And here: https://evergreen.mongodb.com/version/5b6c6abbe3c3311c9aa25b92