{"action":"created","comment":{"url":"https://api.github.com/repos/lxc/lxd/pulls/comments/196135876","pull_request_review_id":129632376,"id":196135876,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjEzNTg3Ng==","diff_hunk":"@@ -164,12 +225,69 @@ func clusterPutJoin(d *Daemon, req api.ClusterPut) Response {\n \t// Asynchronously join the cluster.\n \trun := func(op *operation) error {\n \t\tlogger.Debug(\"Running cluster join operation\")\n-\t\t// First request for this node to be added to the list of\n-\t\t// cluster nodes.\n+\n+\t\t// If the user has provided a cluster password, setup the trust\n+\t\t// relationship by adding our own certificate to the cluster.\n+\t\tif req.ClusterPassword != \"\" {\n+\t\t\terr = cluster.SetupTrust(string(cert.PublicKey()), req.ClusterAddress,\n+\t\t\t\tstring(req.ClusterCertificate), req.ClusterPassword)\n+\t\t\tif err != nil {\n+\t\t\t\treturn errors.Wrap(err, \"failed to setup cluster trust\")","path":"lxd/api_cluster.go","position":152,"original_position":152,"commit_id":"e936dd1e1e0733c489c334c48fde05be15dc85c1","original_commit_id":"e936dd1e1e0733c489c334c48fde05be15dc85c1","user":{"login":"freeekanayaka","id":598445,"node_id":"MDQ6VXNlcjU5ODQ0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/598445?v=4","gravatar_id":"","url":"https://api.github.com/users/freeekanayaka","html_url":"https://github.com/freeekanayaka","followers_url":"https://api.github.com/users/freeekanayaka/followers","following_url":"https://api.github.com/users/freeekanayaka/following{/other_user}","gists_url":"https://api.github.com/users/freeekanayaka/gists{/gist_id}","starred_url":"https://api.github.com/users/freeekanayaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeekanayaka/subscriptions","organizations_url":"https://api.github.com/users/freeekanayaka/orgs","repos_url":"https://api.github.com/users/freeekanayaka/repos","events_url":"https://api.github.com/users/freeekanayaka/events{/privacy}","received_events_url":"https://api.github.com/users/freeekanayaka/received_events","type":"User","site_admin":false},"body":"Fixed.","created_at":"2018-06-18T16:07:30Z","updated_at":"2018-06-18T16:07:30Z","html_url":"https://github.com/lxc/lxd/pull/4652#discussion_r196135876","pull_request_url":"https://api.github.com/repos/lxc/lxd/pulls/4652","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/lxc/lxd/pulls/comments/196135876"},"html":{"href":"https://github.com/lxc/lxd/pull/4652#discussion_r196135876"},"pull_request":{"href":"https://api.github.com/repos/lxc/lxd/pulls/4652"}},"in_reply_to_id":196113704},"pull_request":{"url":"https://api.github.com/repos/lxc/lxd/pulls/4652","id":194840090,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0ODQwMDkw","html_url":"https://github.com/lxc/lxd/pull/4652","diff_url":"https://github.com/lxc/lxd/pull/4652.diff","patch_url":"https://github.com/lxc/lxd/pull/4652.patch","issue_url":"https://api.github.com/repos/lxc/lxd/issues/4652","number":4652,"state":"open","locked":false,"title":"New cluster join api","user":{"login":"freeekanayaka","id":598445,"node_id":"MDQ6VXNlcjU5ODQ0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/598445?v=4","gravatar_id":"","url":"https://api.github.com/users/freeekanayaka","html_url":"https://github.com/freeekanayaka","followers_url":"https://api.github.com/users/freeekanayaka/followers","following_url":"https://api.github.com/users/freeekanayaka/following{/other_user}","gists_url":"https://api.github.com/users/freeekanayaka/gists{/gist_id}","starred_url":"https://api.github.com/users/freeekanayaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeekanayaka/subscriptions","organizations_url":"https://api.github.com/users/freeekanayaka/orgs","repos_url":"https://api.github.com/users/freeekanayaka/repos","events_url":"https://api.github.com/users/freeekanayaka/events{/privacy}","received_events_url":"https://api.github.com/users/freeekanayaka/received_events","type":"User","site_admin":false},"body":"This extends the GET /1.0/cluster and PUT /1.0/cluster endpoints to provide information about the storage pools and networks required to join a cluster and automatically create them.\r\n\r\nCloses #4559.","created_at":"2018-06-14T10:00:47Z","updated_at":"2018-06-18T16:07:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64060e31b36ad698e0662b223bd462d731ad551f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lxc/lxd/pulls/4652/commits","review_comments_url":"https://api.github.com/repos/lxc/lxd/pulls/4652/comments","review_comment_url":"https://api.github.com/repos/lxc/lxd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/4652/comments","statuses_url":"https://api.github.com/repos/lxc/lxd/statuses/e936dd1e1e0733c489c334c48fde05be15dc85c1","head":{"label":"freeekanayaka:new-join-api","ref":"new-join-api","sha":"e936dd1e1e0733c489c334c48fde05be15dc85c1","user":{"login":"freeekanayaka","id":598445,"node_id":"MDQ6VXNlcjU5ODQ0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/598445?v=4","gravatar_id":"","url":"https://api.github.com/users/freeekanayaka","html_url":"https://github.com/freeekanayaka","followers_url":"https://api.github.com/users/freeekanayaka/followers","following_url":"https://api.github.com/users/freeekanayaka/following{/other_user}","gists_url":"https://api.github.com/users/freeekanayaka/gists{/gist_id}","starred_url":"https://api.github.com/users/freeekanayaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeekanayaka/subscriptions","organizations_url":"https://api.github.com/users/freeekanayaka/orgs","repos_url":"https://api.github.com/users/freeekanayaka/repos","events_url":"https://api.github.com/users/freeekanayaka/events{/privacy}","received_events_url":"https://api.github.com/users/freeekanayaka/received_events","type":"User","site_admin":false},"repo":{"id":89224639,"node_id":"MDEwOlJlcG9zaXRvcnk4OTIyNDYzOQ==","name":"lxd","full_name":"freeekanayaka/lxd","owner":{"login":"freeekanayaka","id":598445,"node_id":"MDQ6VXNlcjU5ODQ0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/598445?v=4","gravatar_id":"","url":"https://api.github.com/users/freeekanayaka","html_url":"https://github.com/freeekanayaka","followers_url":"https://api.github.com/users/freeekanayaka/followers","following_url":"https://api.github.com/users/freeekanayaka/following{/other_user}","gists_url":"https://api.github.com/users/freeekanayaka/gists{/gist_id}","starred_url":"https://api.github.com/users/freeekanayaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeekanayaka/subscriptions","organizations_url":"https://api.github.com/users/freeekanayaka/orgs","repos_url":"https://api.github.com/users/freeekanayaka/repos","events_url":"https://api.github.com/users/freeekanayaka/events{/privacy}","received_events_url":"https://api.github.com/users/freeekanayaka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/freeekanayaka/lxd","description":"Daemon based on liblxc offering a REST API to manage containers","fork":true,"url":"https://api.github.com/repos/freeekanayaka/lxd","forks_url":"https://api.github.com/repos/freeekanayaka/lxd/forks","keys_url":"https://api.github.com/repos/freeekanayaka/lxd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freeekanayaka/lxd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freeekanayaka/lxd/teams","hooks_url":"https://api.github.com/repos/freeekanayaka/lxd/hooks","issue_events_url":"https://api.github.com/repos/freeekanayaka/lxd/issues/events{/number}","events_url":"https://api.github.com/repos/freeekanayaka/lxd/events","assignees_url":"https://api.github.com/repos/freeekanayaka/lxd/assignees{/user}","branches_url":"https://api.github.com/repos/freeekanayaka/lxd/branches{/branch}","tags_url":"https://api.github.com/repos/freeekanayaka/lxd/tags","blobs_url":"https://api.github.com/repos/freeekanayaka/lxd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freeekanayaka/lxd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freeekanayaka/lxd/git/refs{/sha}","trees_url":"https://api.github.com/repos/freeekanayaka/lxd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freeekanayaka/lxd/statuses/{sha}","languages_url":"https://api.github.com/repos/freeekanayaka/lxd/languages","stargazers_url":"https://api.github.com/repos/freeekanayaka/lxd/stargazers","contributors_url":"https://api.github.com/repos/freeekanayaka/lxd/contributors","subscribers_url":"https://api.github.com/repos/freeekanayaka/lxd/subscribers","subscription_url":"https://api.github.com/repos/freeekanayaka/lxd/subscription","commits_url":"https://api.github.com/repos/freeekanayaka/lxd/commits{/sha}","git_commits_url":"https://api.github.com/repos/freeekanayaka/lxd/git/commits{/sha}","comments_url":"https://api.github.com/repos/freeekanayaka/lxd/comments{/number}","issue_comment_url":"https://api.github.com/repos/freeekanayaka/lxd/issues/comments{/number}","contents_url":"https://api.github.com/repos/freeekanayaka/lxd/contents/{+path}","compare_url":"https://api.github.com/repos/freeekanayaka/lxd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freeekanayaka/lxd/merges","archive_url":"https://api.github.com/repos/freeekanayaka/lxd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freeekanayaka/lxd/downloads","issues_url":"https://api.github.com/repos/freeekanayaka/lxd/issues{/number}","pulls_url":"https://api.github.com/repos/freeekanayaka/lxd/pulls{/number}","milestones_url":"https://api.github.com/repos/freeekanayaka/lxd/milestones{/number}","notifications_url":"https://api.github.com/repos/freeekanayaka/lxd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freeekanayaka/lxd/labels{/name}","releases_url":"https://api.github.com/repos/freeekanayaka/lxd/releases{/id}","deployments_url":"https://api.github.com/repos/freeekanayaka/lxd/deployments","created_at":"2017-04-24T09:54:38Z","updated_at":"2017-04-24T09:54:40Z","pushed_at":"2018-06-14T22:44:58Z","git_url":"git://github.com/freeekanayaka/lxd.git","ssh_url":"git@github.com:freeekanayaka/lxd.git","clone_url":"https://github.com/freeekanayaka/lxd.git","svn_url":"https://github.com/freeekanayaka/lxd","homepage":"https://linuxcontainers.org/lxd","size":18922,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lxc:master","ref":"master","sha":"577f085611117dd14bb5d7a7331aa5dd269cc6c2","user":{"login":"lxc","id":2301756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDE3NTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2301756?v=4","gravatar_id":"","url":"https://api.github.com/users/lxc","html_url":"https://github.com/lxc","followers_url":"https://api.github.com/users/lxc/followers","following_url":"https://api.github.com/users/lxc/following{/other_user}","gists_url":"https://api.github.com/users/lxc/gists{/gist_id}","starred_url":"https://api.github.com/users/lxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxc/subscriptions","organizations_url":"https://api.github.com/users/lxc/orgs","repos_url":"https://api.github.com/users/lxc/repos","events_url":"https://api.github.com/users/lxc/events{/privacy}","received_events_url":"https://api.github.com/users/lxc/received_events","type":"Organization","site_admin":false},"repo":{"id":26192117,"node_id":"MDEwOlJlcG9zaXRvcnkyNjE5MjExNw==","name":"lxd","full_name":"lxc/lxd","owner":{"login":"lxc","id":2301756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDE3NTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2301756?v=4","gravatar_id":"","url":"https://api.github.com/users/lxc","html_url":"https://github.com/lxc","followers_url":"https://api.github.com/users/lxc/followers","following_url":"https://api.github.com/users/lxc/following{/other_user}","gists_url":"https://api.github.com/users/lxc/gists{/gist_id}","starred_url":"https://api.github.com/users/lxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxc/subscriptions","organizations_url":"https://api.github.com/users/lxc/orgs","repos_url":"https://api.github.com/users/lxc/repos","events_url":"https://api.github.com/users/lxc/events{/privacy}","received_events_url":"https://api.github.com/users/lxc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lxc/lxd","description":"Daemon based on liblxc offering a REST API to manage containers","fork":false,"url":"https://api.github.com/repos/lxc/lxd","forks_url":"https://api.github.com/repos/lxc/lxd/forks","keys_url":"https://api.github.com/repos/lxc/lxd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lxc/lxd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lxc/lxd/teams","hooks_url":"https://api.github.com/repos/lxc/lxd/hooks","issue_events_url":"https://api.github.com/repos/lxc/lxd/issues/events{/number}","events_url":"https://api.github.com/repos/lxc/lxd/events","assignees_url":"https://api.github.com/repos/lxc/lxd/assignees{/user}","branches_url":"https://api.github.com/repos/lxc/lxd/branches{/branch}","tags_url":"https://api.github.com/repos/lxc/lxd/tags","blobs_url":"https://api.github.com/repos/lxc/lxd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lxc/lxd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lxc/lxd/git/refs{/sha}","trees_url":"https://api.github.com/repos/lxc/lxd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lxc/lxd/statuses/{sha}","languages_url":"https://api.github.com/repos/lxc/lxd/languages","stargazers_url":"https://api.github.com/repos/lxc/lxd/stargazers","contributors_url":"https://api.github.com/repos/lxc/lxd/contributors","subscribers_url":"https://api.github.com/repos/lxc/lxd/subscribers","subscription_url":"https://api.github.com/repos/lxc/lxd/subscription","commits_url":"https://api.github.com/repos/lxc/lxd/commits{/sha}","git_commits_url":"https://api.github.com/repos/lxc/lxd/git/commits{/sha}","comments_url":"https://api.github.com/repos/lxc/lxd/comments{/number}","issue_comment_url":"https://api.github.com/repos/lxc/lxd/issues/comments{/number}","contents_url":"https://api.github.com/repos/lxc/lxd/contents/{+path}","compare_url":"https://api.github.com/repos/lxc/lxd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lxc/lxd/merges","archive_url":"https://api.github.com/repos/lxc/lxd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lxc/lxd/downloads","issues_url":"https://api.github.com/repos/lxc/lxd/issues{/number}","pulls_url":"https://api.github.com/repos/lxc/lxd/pulls{/number}","milestones_url":"https://api.github.com/repos/lxc/lxd/milestones{/number}","notifications_url":"https://api.github.com/repos/lxc/lxd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lxc/lxd/labels{/name}","releases_url":"https://api.github.com/repos/lxc/lxd/releases{/id}","deployments_url":"https://api.github.com/repos/lxc/lxd/deployments","created_at":"2014-11-04T22:40:52Z","updated_at":"2018-06-18T05:19:43Z","pushed_at":"2018-06-18T14:40:15Z","git_url":"git://github.com/lxc/lxd.git","ssh_url":"git@github.com:lxc/lxd.git","clone_url":"https://github.com/lxc/lxd.git","svn_url":"https://github.com/lxc/lxd","homepage":"https://linuxcontainers.org/lxd","size":20838,"stargazers_count":1802,"watchers_count":1802,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":434,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":434,"open_issues":55,"watchers":1802,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lxc/lxd/pulls/4652"},"html":{"href":"https://github.com/lxc/lxd/pull/4652"},"issue":{"href":"https://api.github.com/repos/lxc/lxd/issues/4652"},"comments":{"href":"https://api.github.com/repos/lxc/lxd/issues/4652/comments"},"review_comments":{"href":"https://api.github.com/repos/lxc/lxd/pulls/4652/comments"},"review_comment":{"href":"https://api.github.com/repos/lxc/lxd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lxc/lxd/pulls/4652/commits"},"statuses":{"href":"https://api.github.com/repos/lxc/lxd/statuses/e936dd1e1e0733c489c334c48fde05be15dc85c1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"freeekanayaka"}}