Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Refactoring of replicaset initiation #2239
Conversation
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$apt-get-is-sick$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$one-more-time$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$bad-record-MAC$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Generating tarball failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
mjs
added some commits
May 5, 2015
|
$$alrighty-then$$ |
|
$$hello$$ |
|
$$merge$$ |
|
Build failed: sad trombone |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$hmmm$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
mjs commentedMay 7, 2015
cmd/jujud/agent: refactoring replicaset initiation
Instead of deciding whether to do replicaset initiation based on the previous agent version (which can't be relied on in all cases - see the ticket), initiate the replicaset if it hasn't been done yet. This approach is now also taken for other DB upgrade related tasks such as adding the admin user and generating the shared secret.
Also added some basic tests for replicaset initiating as there were none.
Fixes LP #1441913.
worker/peergrouper: avoid unnecessary replicaset initiate attempts
InitiateMongoServer kept trying to initiate the replicaset when it was
already initiated. The retry loop is now exited early if the
replicaset is already up.
This also reduces the peergrouper tests run time from ~2 mins to a few
seconds!
(Review request: http://reviews.vapour.ws/r/1599/)