Skip to content

Conversation

@sharon-tickell
Copy link

This PR builds on #25, going beyond just a version update to perform some refactoring of the controller-logic.

It refactors the replica_ctrl.py script to:

  • NOT cache and reuse the Mongo service instance, but instead re-retrieve it on each scheduled check. This means the mongo_controller service doesn't need to exit and restart if the mongo service it is controlling has restarted: it just handles that situation gracefully.
  • Force-update the replicaset configuration when more than one replicaset member needs to be changed. (It would previously fail, exit and restart in this scenario)
  • Gracefully exit the control-loop if a SIGINT or SIGTERM signal has been sent to the replicaset, indicating that the docker service is being shut down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant