{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/170140983","pull_request_review_id":98783240,"id":170140983,"diff_hunk":"@@ -252,6 +253,33 @@ func (t *ToolsSuite) TestChangeAgentTools(c *gc.C) {\n \tassertDirNames(c, agenttools.ToolsDir(t.dataDir, \"testagent\"), []string{\"quantal\", \"amd64\", agenttools.ToolsFile})\n }\n \n+func (t *ToolsSuite) TestMaybeReadTools(c *gc.C) {\n+\tfiles := []*testing.TarFile{\n+\t\ttesting.NewTarFile(\"jujud\", agenttools.DirPerm, \"jujuc executable\"),\n+\t}\n+\tdata, checksum := testing.TarGz(files...)\n+\ttestTools := &coretest.Tools{\n+\t\tURL:     \"http://foo/bar1\",\n+\t\tVersion: version.MustParseBinary(\"1.2.3-trusty-amd64\"),\n+\t\tSize:    int64(len(data)),\n+\t\tSHA256:  checksum,\n+\t}\n+\terr := agenttools.UnpackTools(t.dataDir, testTools, bytes.NewReader(data))\n+\tc.Assert(err, jc.ErrorIsNil)\n+\tt.PatchValue(&series.MustHostSeries, func() string { return \"xenial\" })\n+\tgotTools, err := agenttools.MaybeReadTools(t.dataDir, version.MustParseBinary(\"1.2.3-xenial-amd64\"))\n+\tc.Assert(err, jc.ErrorIsNil)\n+\tc.Assert(*gotTools, gc.Equals, *testTools)","path":"agent/tools/tools_test.go","position":28,"original_position":28,"commit_id":"4a3d28c66d1f3112e3ed284c6692a654b4b175c5","original_commit_id":"4a3d28c66d1f3112e3ed284c6692a654b4b175c5","user":{"login":"wallyworld","id":5808968,"avatar_url":"https://avatars3.githubusercontent.com/u/5808968?v=4","gravatar_id":"","url":"https://api.github.com/users/wallyworld","html_url":"https://github.com/wallyworld","followers_url":"https://api.github.com/users/wallyworld/followers","following_url":"https://api.github.com/users/wallyworld/following{/other_user}","gists_url":"https://api.github.com/users/wallyworld/gists{/gist_id}","starred_url":"https://api.github.com/users/wallyworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wallyworld/subscriptions","organizations_url":"https://api.github.com/users/wallyworld/orgs","repos_url":"https://api.github.com/users/wallyworld/repos","events_url":"https://api.github.com/users/wallyworld/events{/privacy}","received_events_url":"https://api.github.com/users/wallyworld/received_events","type":"User","site_admin":false},"body":"shouldn't the series on gotTools be xenial? to match the host series?","created_at":"2018-02-23T01:04:58Z","updated_at":"2018-02-23T01:08:41Z","html_url":"https://github.com/juju/juju/pull/8412#discussion_r170140983","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/8412","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/170140983"},"html":{"href":"https://github.com/juju/juju/pull/8412#discussion_r170140983"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/8412"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/8412","id":170585778,"html_url":"https://github.com/juju/juju/pull/8412","diff_url":"https://github.com/juju/juju/pull/8412.diff","patch_url":"https://github.com/juju/juju/pull/8412.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/8412","number":8412,"state":"open","locked":false,"title":"fix lp 1749201 Series upgrade doesn't start unit agents","user":{"login":"hmlanigan","id":18268820,"avatar_url":"https://avatars0.githubusercontent.com/u/18268820?v=4","gravatar_id":"","url":"https://api.github.com/users/hmlanigan","html_url":"https://github.com/hmlanigan","followers_url":"https://api.github.com/users/hmlanigan/followers","following_url":"https://api.github.com/users/hmlanigan/following{/other_user}","gists_url":"https://api.github.com/users/hmlanigan/gists{/gist_id}","starred_url":"https://api.github.com/users/hmlanigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmlanigan/subscriptions","organizations_url":"https://api.github.com/users/hmlanigan/orgs","repos_url":"https://api.github.com/users/hmlanigan/repos","events_url":"https://api.github.com/users/hmlanigan/events{/privacy}","received_events_url":"https://api.github.com/users/hmlanigan/received_events","type":"User","site_admin":false},"body":"## Description of change\r\n\r\nDuring unit deployment, or redeployment, if the agents (tools) based on the current machine series can't be found, search for agents with the agent machine series from state.  This is necessary for getting units back up and running after the series is upgraded.  \r\n\r\n## QA steps\r\n\r\nHow do we verify that the change works?\r\n\r\n## Documentation changes\r\n\r\nFollow instructions from the howto-upgradeseries juju doc.\r\n\r\n## Bug reference\r\n\r\nhttps://bugs.launchpad.net/juju/+bug/1749201","created_at":"2018-02-21T20:55:28Z","updated_at":"2018-02-23T01:08:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e72e723e3b670c27bfc80024a3b8a3048072eb0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/8412/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/8412/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/8412/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/4a3d28c66d1f3112e3ed284c6692a654b4b175c5","head":{"label":"hmlanigan:bug1749201","ref":"bug1749201","sha":"4a3d28c66d1f3112e3ed284c6692a654b4b175c5","user":{"login":"hmlanigan","id":18268820,"avatar_url":"https://avatars0.githubusercontent.com/u/18268820?v=4","gravatar_id":"","url":"https://api.github.com/users/hmlanigan","html_url":"https://github.com/hmlanigan","followers_url":"https://api.github.com/users/hmlanigan/followers","following_url":"https://api.github.com/users/hmlanigan/following{/other_user}","gists_url":"https://api.github.com/users/hmlanigan/gists{/gist_id}","starred_url":"https://api.github.com/users/hmlanigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmlanigan/subscriptions","organizations_url":"https://api.github.com/users/hmlanigan/orgs","repos_url":"https://api.github.com/users/hmlanigan/repos","events_url":"https://api.github.com/users/hmlanigan/events{/privacy}","received_events_url":"https://api.github.com/users/hmlanigan/received_events","type":"User","site_admin":false},"repo":{"id":70625718,"name":"juju","full_name":"hmlanigan/juju","owner":{"login":"hmlanigan","id":18268820,"avatar_url":"https://avatars0.githubusercontent.com/u/18268820?v=4","gravatar_id":"","url":"https://api.github.com/users/hmlanigan","html_url":"https://github.com/hmlanigan","followers_url":"https://api.github.com/users/hmlanigan/followers","following_url":"https://api.github.com/users/hmlanigan/following{/other_user}","gists_url":"https://api.github.com/users/hmlanigan/gists{/gist_id}","starred_url":"https://api.github.com/users/hmlanigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmlanigan/subscriptions","organizations_url":"https://api.github.com/users/hmlanigan/orgs","repos_url":"https://api.github.com/users/hmlanigan/repos","events_url":"https://api.github.com/users/hmlanigan/events{/privacy}","received_events_url":"https://api.github.com/users/hmlanigan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hmlanigan/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/hmlanigan/juju","forks_url":"https://api.github.com/repos/hmlanigan/juju/forks","keys_url":"https://api.github.com/repos/hmlanigan/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmlanigan/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmlanigan/juju/teams","hooks_url":"https://api.github.com/repos/hmlanigan/juju/hooks","issue_events_url":"https://api.github.com/repos/hmlanigan/juju/issues/events{/number}","events_url":"https://api.github.com/repos/hmlanigan/juju/events","assignees_url":"https://api.github.com/repos/hmlanigan/juju/assignees{/user}","branches_url":"https://api.github.com/repos/hmlanigan/juju/branches{/branch}","tags_url":"https://api.github.com/repos/hmlanigan/juju/tags","blobs_url":"https://api.github.com/repos/hmlanigan/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmlanigan/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmlanigan/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmlanigan/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmlanigan/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/hmlanigan/juju/languages","stargazers_url":"https://api.github.com/repos/hmlanigan/juju/stargazers","contributors_url":"https://api.github.com/repos/hmlanigan/juju/contributors","subscribers_url":"https://api.github.com/repos/hmlanigan/juju/subscribers","subscription_url":"https://api.github.com/repos/hmlanigan/juju/subscription","commits_url":"https://api.github.com/repos/hmlanigan/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmlanigan/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmlanigan/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmlanigan/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmlanigan/juju/contents/{+path}","compare_url":"https://api.github.com/repos/hmlanigan/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmlanigan/juju/merges","archive_url":"https://api.github.com/repos/hmlanigan/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmlanigan/juju/downloads","issues_url":"https://api.github.com/repos/hmlanigan/juju/issues{/number}","pulls_url":"https://api.github.com/repos/hmlanigan/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/hmlanigan/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/hmlanigan/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmlanigan/juju/labels{/name}","releases_url":"https://api.github.com/repos/hmlanigan/juju/releases{/id}","deployments_url":"https://api.github.com/repos/hmlanigan/juju/deployments","created_at":"2016-10-11T18:56:28Z","updated_at":"2016-10-11T18:56:39Z","pushed_at":"2018-02-23T00:32:31Z","git_url":"git://github.com/hmlanigan/juju.git","ssh_url":"git@github.com:hmlanigan/juju.git","clone_url":"https://github.com/hmlanigan/juju.git","svn_url":"https://github.com/hmlanigan/juju","homepage":"juju.ubuntu.com","size":206104,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"juju:develop","ref":"develop","sha":"65bc411fb786ac7a621d4290a762d896c3317ce4","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"name":"juju","full_name":"juju/juju","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju/deployments","created_at":"2014-06-03T14:28:10Z","updated_at":"2018-02-22T17:14:47Z","pushed_at":"2018-02-23T00:46:39Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":206503,"stargazers_count":1106,"watchers_count":1106,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":257,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":257,"open_issues":11,"watchers":1106,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/8412"},"html":{"href":"https://github.com/juju/juju/pull/8412"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/8412"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/8412/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/8412/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/8412/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/4a3d28c66d1f3112e3ed284c6692a654b4b175c5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"wallyworld"}}