{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/mantle/pulls/comments/26994337","id":26994337,"diff_hunk":"@@ -22,29 +24,40 @@ func etcdDiscovery(cluster platform.Cluster) error {\n \tfor i, m := range cluster.Machines() {\n \t\t// start etcd instance\n \t\tetcdStart := \"sudo systemctl start etcd.service\"\n-\t\t_, err := m.SSH(etcdStart)\n+\t\t//etcdStart := \"etcd version\"\n+\t\tb, err := m.SSH(etcdStart)\n \t\tif err != nil {\n \t\t\treturn fmt.Errorf(\"SSH cmd to %v failed: %s\", m.IP(), err)\n \t\t}\n-\t\tfmt.Fprintf(os.Stderr, \"etcd instance%d started\\n\", i)\n+\t\tfmt.Fprintf(os.Stderr, \"etcd instance%d started%s\\n\", i, b)\n \t}\n \n \tfmt.Fprintf(os.Stderr, \"Waiting for discovery to finish...\\n\")\n-\ttime.Sleep(1 * time.Second)\n \n-\t// get status of etcd instances\n-\tcmd := cluster.NewCommand(\"curl\", \"-L\", \"http://10.0.0.2:4001/v2/machines\")\n-\tb, err := cmd.Output()\n-\tif err != nil {\n-\t\treturn fmt.Errorf(\"Error requesting cluster members: %v\", err)\n+\t// get status of etcd instances -- retry until satisfied\n+\tvar members []string\n+\tvar success bool\n+\tfor i := 0; i < curlRetries; i++ {\n+\t\ttime.Sleep(time.Second)\n+\t\tcmd := cluster.NewCommand(\"curl\", \"http://10.0.0.2:4001/v2/machines\")\n+\t\tb, err := cmd.Output()\n+\t\tif err != nil {\n+\t\t\tcontinue\n+\t\t}\n+\t\tmembers = strings.Split(string(b), \",\")\n+\t\t// etcd 2.0 listens on 2 ports for clients and returne 2*csize\n+\t\tif len(members) == csize || len(members) == csize*2 {","path":"cmd/kola/etcdtests/etcdDiscovery.go","position":43,"original_position":43,"commit_id":"230e0f5a51f4e5839869001a35ed7ad60a2b0241","original_commit_id":"230e0f5a51f4e5839869001a35ed7ad60a2b0241","user":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"body":"Curling `/v2/machines` seemed to be the only version agnostic way to easily see that the cluster had formed correctly, but is slightly ugly in that 2.0.x normally returns a list that is double the cluster size.  curling `/v2/members` is 2.0.x only.\r\n\r\nI'll check that `etcdctl cluster-health` returns 3 healthy members instead.","created_at":"2015-03-24T00:19:58Z","updated_at":"2015-03-24T00:19:58Z","html_url":"https://github.com/coreos/mantle/pull/25#discussion_r26994337","pull_request_url":"https://api.github.com/repos/coreos/mantle/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/coreos/mantle/pulls/comments/26994337"},"html":{"href":"https://github.com/coreos/mantle/pull/25#discussion_r26994337"},"pull_request":{"href":"https://api.github.com/repos/coreos/mantle/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/mantle/pulls/25","id":31661779,"html_url":"https://github.com/coreos/mantle/pull/25","diff_url":"https://github.com/coreos/mantle/pull/25.diff","patch_url":"https://github.com/coreos/mantle/pull/25.patch","issue_url":"https://api.github.com/repos/coreos/mantle/issues/25","number":25,"state":"open","locked":false,"title":"cmd/kola: add multiple etcd discovery tests and better vm cleanup","user":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"body":"Add multiple discovery tests for different etcd versions and configurations. Requires image build with both versions: export ETCD_PROTOCOLS=\"1 2\"\r\n\r\n/cc @marineam ","created_at":"2015-03-21T00:09:59Z","updated_at":"2015-03-24T00:19:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62cf9f076e9cbc691203be26947846ad6bb0bfd8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/mantle/pulls/25/commits","review_comments_url":"https://api.github.com/repos/coreos/mantle/pulls/25/comments","review_comment_url":"https://api.github.com/repos/coreos/mantle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/mantle/issues/25/comments","statuses_url":"https://api.github.com/repos/coreos/mantle/statuses/230e0f5a51f4e5839869001a35ed7ad60a2b0241","head":{"label":"pbx0:etcdDiscovery","ref":"etcdDiscovery","sha":"230e0f5a51f4e5839869001a35ed7ad60a2b0241","user":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"repo":{"id":31443603,"name":"mantle","full_name":"pbx0/mantle","owner":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pbx0/mantle","description":"Mantle: Gluing CoreOS together","fork":true,"url":"https://api.github.com/repos/pbx0/mantle","forks_url":"https://api.github.com/repos/pbx0/mantle/forks","keys_url":"https://api.github.com/repos/pbx0/mantle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pbx0/mantle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pbx0/mantle/teams","hooks_url":"https://api.github.com/repos/pbx0/mantle/hooks","issue_events_url":"https://api.github.com/repos/pbx0/mantle/issues/events{/number}","events_url":"https://api.github.com/repos/pbx0/mantle/events","assignees_url":"https://api.github.com/repos/pbx0/mantle/assignees{/user}","branches_url":"https://api.github.com/repos/pbx0/mantle/branches{/branch}","tags_url":"https://api.github.com/repos/pbx0/mantle/tags","blobs_url":"https://api.github.com/repos/pbx0/mantle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pbx0/mantle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pbx0/mantle/git/refs{/sha}","trees_url":"https://api.github.com/repos/pbx0/mantle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pbx0/mantle/statuses/{sha}","languages_url":"https://api.github.com/repos/pbx0/mantle/languages","stargazers_url":"https://api.github.com/repos/pbx0/mantle/stargazers","contributors_url":"https://api.github.com/repos/pbx0/mantle/contributors","subscribers_url":"https://api.github.com/repos/pbx0/mantle/subscribers","subscription_url":"https://api.github.com/repos/pbx0/mantle/subscription","commits_url":"https://api.github.com/repos/pbx0/mantle/commits{/sha}","git_commits_url":"https://api.github.com/repos/pbx0/mantle/git/commits{/sha}","comments_url":"https://api.github.com/repos/pbx0/mantle/comments{/number}","issue_comment_url":"https://api.github.com/repos/pbx0/mantle/issues/comments{/number}","contents_url":"https://api.github.com/repos/pbx0/mantle/contents/{+path}","compare_url":"https://api.github.com/repos/pbx0/mantle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pbx0/mantle/merges","archive_url":"https://api.github.com/repos/pbx0/mantle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pbx0/mantle/downloads","issues_url":"https://api.github.com/repos/pbx0/mantle/issues{/number}","pulls_url":"https://api.github.com/repos/pbx0/mantle/pulls{/number}","milestones_url":"https://api.github.com/repos/pbx0/mantle/milestones{/number}","notifications_url":"https://api.github.com/repos/pbx0/mantle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pbx0/mantle/labels{/name}","releases_url":"https://api.github.com/repos/pbx0/mantle/releases{/id}","created_at":"2015-02-27T23:22:32Z","updated_at":"2015-02-27T23:22:32Z","pushed_at":"2015-03-21T00:07:21Z","git_url":"git://github.com/pbx0/mantle.git","ssh_url":"git@github.com:pbx0/mantle.git","clone_url":"https://github.com/pbx0/mantle.git","svn_url":"https://github.com/pbx0/mantle","homepage":"","size":940,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"f012620c2df8195d1289366c8fd186486795a4f6","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":27562362,"name":"mantle","full_name":"coreos/mantle","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/mantle","description":"Mantle: Gluing CoreOS together","fork":false,"url":"https://api.github.com/repos/coreos/mantle","forks_url":"https://api.github.com/repos/coreos/mantle/forks","keys_url":"https://api.github.com/repos/coreos/mantle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/mantle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/mantle/teams","hooks_url":"https://api.github.com/repos/coreos/mantle/hooks","issue_events_url":"https://api.github.com/repos/coreos/mantle/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/mantle/events","assignees_url":"https://api.github.com/repos/coreos/mantle/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/mantle/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/mantle/tags","blobs_url":"https://api.github.com/repos/coreos/mantle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/mantle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/mantle/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/mantle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/mantle/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/mantle/languages","stargazers_url":"https://api.github.com/repos/coreos/mantle/stargazers","contributors_url":"https://api.github.com/repos/coreos/mantle/contributors","subscribers_url":"https://api.github.com/repos/coreos/mantle/subscribers","subscription_url":"https://api.github.com/repos/coreos/mantle/subscription","commits_url":"https://api.github.com/repos/coreos/mantle/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/mantle/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/mantle/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/mantle/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/mantle/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/mantle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/mantle/merges","archive_url":"https://api.github.com/repos/coreos/mantle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/mantle/downloads","issues_url":"https://api.github.com/repos/coreos/mantle/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/mantle/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/mantle/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/mantle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/mantle/labels{/name}","releases_url":"https://api.github.com/repos/coreos/mantle/releases{/id}","created_at":"2014-12-04T22:09:02Z","updated_at":"2015-03-23T19:59:11Z","pushed_at":"2015-03-23T19:59:11Z","git_url":"git://github.com/coreos/mantle.git","ssh_url":"git@github.com:coreos/mantle.git","clone_url":"https://github.com/coreos/mantle.git","svn_url":"https://github.com/coreos/mantle","homepage":"","size":1192,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":9,"forks":5,"open_issues":9,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/mantle/pulls/25"},"html":{"href":"https://github.com/coreos/mantle/pull/25"},"issue":{"href":"https://api.github.com/repos/coreos/mantle/issues/25"},"comments":{"href":"https://api.github.com/repos/coreos/mantle/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/mantle/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/mantle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/mantle/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/mantle/statuses/230e0f5a51f4e5839869001a35ed7ad60a2b0241"}}}}