{"action":"created","issue":{"url":"https://api.github.com/repos/juju/juju/issues/2241","labels_url":"https://api.github.com/repos/juju/juju/issues/2241/labels{/name}","comments_url":"https://api.github.com/repos/juju/juju/issues/2241/comments","events_url":"https://api.github.com/repos/juju/juju/issues/2241/events","html_url":"https://github.com/juju/juju/pull/2241","id":73840857,"number":2241,"title":"Refactoring of replicaset initiation","user":{"login":"mjs","id":14993,"avatar_url":"https://avatars.githubusercontent.com/u/14993?v=3","gravatar_id":"","url":"https://api.github.com/users/mjs","html_url":"https://github.com/mjs","followers_url":"https://api.github.com/users/mjs/followers","following_url":"https://api.github.com/users/mjs/following{/other_user}","gists_url":"https://api.github.com/users/mjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjs/subscriptions","organizations_url":"https://api.github.com/users/mjs/orgs","repos_url":"https://api.github.com/users/mjs/repos","events_url":"https://api.github.com/users/mjs/events{/privacy}","received_events_url":"https://api.github.com/users/mjs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-07T04:47:10Z","updated_at":"2015-05-08T04:12:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/2241","html_url":"https://github.com/juju/juju/pull/2241","diff_url":"https://github.com/juju/juju/pull/2241.diff","patch_url":"https://github.com/juju/juju/pull/2241.patch"},"body":"**cmd/jujud/agent: refactoring replicaset initiation**\r\n\r\nInstead 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.\r\n\r\nAlso added some basic tests for replicaset initiating as there were none.\r\n\r\nFixes LP #1441913.\r\n\r\n**worker/peergrouper: avoid unnecessary replicaset initiate attempts**\r\n\r\nInitiateMongoServer kept trying to initiate the replicaset when it was\r\nalready initiated. The retry loop is now exited early if the\r\nreplicaset is already up.\r\n\r\nThis also reduces the peergrouper tests run time from ~2 mins to a few\r\nseconds!\n\n(Review request: http://reviews.vapour.ws/r/1601/)"},"comment":{"url":"https://api.github.com/repos/juju/juju/issues/comments/100096854","html_url":"https://github.com/juju/juju/pull/2241#issuecomment-100096854","issue_url":"https://api.github.com/repos/juju/juju/issues/2241","id":100096854,"user":{"login":"jujubot","id":7779494,"avatar_url":"https://avatars.githubusercontent.com/u/7779494?v=3","gravatar_id":"","url":"https://api.github.com/users/jujubot","html_url":"https://github.com/jujubot","followers_url":"https://api.github.com/users/jujubot/followers","following_url":"https://api.github.com/users/jujubot/following{/other_user}","gists_url":"https://api.github.com/users/jujubot/gists{/gist_id}","starred_url":"https://api.github.com/users/jujubot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jujubot/subscriptions","organizations_url":"https://api.github.com/users/jujubot/orgs","repos_url":"https://api.github.com/users/jujubot/repos","events_url":"https://api.github.com/users/jujubot/events{/privacy}","received_events_url":"https://api.github.com/users/jujubot/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T04:12:13Z","updated_at":"2015-05-08T04:12:13Z","body":"Build failed: Tests failed\n        build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/3153\n"}}