{"action":"created","comment":{"url":"https://api.github.com/repos/percona/percona-agent/pulls/comments/29265675","id":29265675,"diff_hunk":"@@ -49,8 +46,9 @@ type Manager struct {\n \tagentConfig    *agent.Config\n }\n \n-func NewManager(logger *pct.Logger, configDir string, api pct.APIConnector, mrm mrms.Monitor) *Manager {\n+func NewManager(logger *pct.Logger, configDir string, api pct.APIConnector, mrm mrms.Monitor, systemTreeURL string) *Manager {","path":"instance/manager.go","position":22,"original_position":22,"commit_id":"c6f79ed9dc5bd9a572891c57fd592cc4f84f2008","original_commit_id":"43acc58d941db9c218ae16c4daf9af1ebed3df48","user":{"login":"mpaolino","id":757973,"avatar_url":"https://avatars.githubusercontent.com/u/757973?v=3","gravatar_id":"","url":"https://api.github.com/users/mpaolino","html_url":"https://github.com/mpaolino","followers_url":"https://api.github.com/users/mpaolino/followers","following_url":"https://api.github.com/users/mpaolino/following{/other_user}","gists_url":"https://api.github.com/users/mpaolino/gists{/gist_id}","starred_url":"https://api.github.com/users/mpaolino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpaolino/subscriptions","organizations_url":"https://api.github.com/users/mpaolino/orgs","repos_url":"https://api.github.com/users/mpaolino/repos","events_url":"https://api.github.com/users/mpaolino/events{/privacy}","received_events_url":"https://api.github.com/users/mpaolino/received_events","type":"User","site_admin":false},"body":"Absolutely, fixing","created_at":"2015-04-28T17:20:11Z","updated_at":"2015-04-28T17:20:11Z","html_url":"https://github.com/percona/percona-agent/pull/171#discussion_r29265675","pull_request_url":"https://api.github.com/repos/percona/percona-agent/pulls/171","_links":{"self":{"href":"https://api.github.com/repos/percona/percona-agent/pulls/comments/29265675"},"html":{"href":"https://github.com/percona/percona-agent/pull/171#discussion_r29265675"},"pull_request":{"href":"https://api.github.com/repos/percona/percona-agent/pulls/171"}}},"pull_request":{"url":"https://api.github.com/repos/percona/percona-agent/pulls/171","id":34060696,"html_url":"https://github.com/percona/percona-agent/pull/171","diff_url":"https://github.com/percona/percona-agent/pull/171.diff","patch_url":"https://github.com/percona/percona-agent/pull/171.patch","issue_url":"https://api.github.com/repos/percona/percona-agent/issues/171","number":171,"state":"open","locked":false,"title":"PCT-1482: QAN manager refactor, instance manager, HAL","user":{"login":"mpaolino","id":757973,"avatar_url":"https://avatars.githubusercontent.com/u/757973?v=3","gravatar_id":"","url":"https://api.github.com/users/mpaolino","html_url":"https://github.com/mpaolino","followers_url":"https://api.github.com/users/mpaolino/followers","following_url":"https://api.github.com/users/mpaolino/following{/other_user}","gists_url":"https://api.github.com/users/mpaolino/gists{/gist_id}","starred_url":"https://api.github.com/users/mpaolino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpaolino/subscriptions","organizations_url":"https://api.github.com/users/mpaolino/orgs","repos_url":"https://api.github.com/users/mpaolino/repos","events_url":"https://api.github.com/users/mpaolino/events{/privacy}","received_events_url":"https://api.github.com/users/mpaolino/received_events","type":"User","site_admin":false},"body":"This branch includes the refactor of the instance manager and qan manager (this branch was branched of PCT-1481-instances-tree, which was branched of release).\r\n\r\nNew behavior for instances and qan manager:\r\n\r\nInstances manager will get the complete instance tree via WS command or it will get it consuming a webservice. Updates to this tree will be pushed from API using WS command (\"UpdateTree\" cmd for instance service, proto.InstanceSync as payload). Updates of MySQL instances will pushed to API with a PUT on the corresponding instance endpoint but leaving subsystems out of it (they are ignored by the webservice). Full instance tree will be requested from API during qan manager initialization if no config file was found. This tree will only be the instances of the OS system where the agent is running.\r\n\r\nAdditionally:\r\n\r\n* Add/delete/updates to instances will be passed along by the API with the tree and its version.\r\n* All instances will be stored in a single system-tree.json file in config directory.\r\n* QAN manager will keep separated configs for every configured instance with naming qan-<uuid>.conf.\r\n* Installer now accepts a single new X-Percona-Limit-Err to notify reaching the limits for number of instances.\r\n* Refactor \"service\" name to \"tool\" in all the places I could find -and made sense-.\r\n* Installer now expects resources hyperlinks to be present in HAL format (mocks on fakeapi updated)\r\n","created_at":"2015-04-24T15:48:03Z","updated_at":"2015-04-28T17:20:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e51bfeeb4d5b3a35f9fbb1ee8543984483de9790","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/percona/percona-agent/pulls/171/commits","review_comments_url":"https://api.github.com/repos/percona/percona-agent/pulls/171/comments","review_comment_url":"https://api.github.com/repos/percona/percona-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/percona/percona-agent/issues/171/comments","statuses_url":"https://api.github.com/repos/percona/percona-agent/statuses/c6f79ed9dc5bd9a572891c57fd592cc4f84f2008","head":{"label":"percona:PCT-1482","ref":"PCT-1482","sha":"c6f79ed9dc5bd9a572891c57fd592cc4f84f2008","user":{"login":"percona","id":1683025,"avatar_url":"https://avatars.githubusercontent.com/u/1683025?v=3","gravatar_id":"","url":"https://api.github.com/users/percona","html_url":"https://github.com/percona","followers_url":"https://api.github.com/users/percona/followers","following_url":"https://api.github.com/users/percona/following{/other_user}","gists_url":"https://api.github.com/users/percona/gists{/gist_id}","starred_url":"https://api.github.com/users/percona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percona/subscriptions","organizations_url":"https://api.github.com/users/percona/orgs","repos_url":"https://api.github.com/users/percona/repos","events_url":"https://api.github.com/users/percona/events{/privacy}","received_events_url":"https://api.github.com/users/percona/received_events","type":"Organization","site_admin":false},"repo":{"id":11132795,"name":"percona-agent","full_name":"percona/percona-agent","owner":{"login":"percona","id":1683025,"avatar_url":"https://avatars.githubusercontent.com/u/1683025?v=3","gravatar_id":"","url":"https://api.github.com/users/percona","html_url":"https://github.com/percona","followers_url":"https://api.github.com/users/percona/followers","following_url":"https://api.github.com/users/percona/following{/other_user}","gists_url":"https://api.github.com/users/percona/gists{/gist_id}","starred_url":"https://api.github.com/users/percona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percona/subscriptions","organizations_url":"https://api.github.com/users/percona/orgs","repos_url":"https://api.github.com/users/percona/repos","events_url":"https://api.github.com/users/percona/events{/privacy}","received_events_url":"https://api.github.com/users/percona/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/percona/percona-agent","description":"Percona Cloud Tools Agent","fork":false,"url":"https://api.github.com/repos/percona/percona-agent","forks_url":"https://api.github.com/repos/percona/percona-agent/forks","keys_url":"https://api.github.com/repos/percona/percona-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/percona/percona-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/percona/percona-agent/teams","hooks_url":"https://api.github.com/repos/percona/percona-agent/hooks","issue_events_url":"https://api.github.com/repos/percona/percona-agent/issues/events{/number}","events_url":"https://api.github.com/repos/percona/percona-agent/events","assignees_url":"https://api.github.com/repos/percona/percona-agent/assignees{/user}","branches_url":"https://api.github.com/repos/percona/percona-agent/branches{/branch}","tags_url":"https://api.github.com/repos/percona/percona-agent/tags","blobs_url":"https://api.github.com/repos/percona/percona-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/percona/percona-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/percona/percona-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/percona/percona-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/percona/percona-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/percona/percona-agent/languages","stargazers_url":"https://api.github.com/repos/percona/percona-agent/stargazers","contributors_url":"https://api.github.com/repos/percona/percona-agent/contributors","subscribers_url":"https://api.github.com/repos/percona/percona-agent/subscribers","subscription_url":"https://api.github.com/repos/percona/percona-agent/subscription","commits_url":"https://api.github.com/repos/percona/percona-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/percona/percona-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/percona/percona-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/percona/percona-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/percona/percona-agent/contents/{+path}","compare_url":"https://api.github.com/repos/percona/percona-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/percona/percona-agent/merges","archive_url":"https://api.github.com/repos/percona/percona-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/percona/percona-agent/downloads","issues_url":"https://api.github.com/repos/percona/percona-agent/issues{/number}","pulls_url":"https://api.github.com/repos/percona/percona-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/percona/percona-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/percona/percona-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/percona/percona-agent/labels{/name}","releases_url":"https://api.github.com/repos/percona/percona-agent/releases{/id}","created_at":"2013-07-02T19:09:37Z","updated_at":"2015-04-23T16:37:23Z","pushed_at":"2015-04-28T17:11:27Z","git_url":"git://github.com/percona/percona-agent.git","ssh_url":"git@github.com:percona/percona-agent.git","clone_url":"https://github.com/percona/percona-agent.git","svn_url":"https://github.com/percona/percona-agent","homepage":"","size":13684,"stargazers_count":38,"watchers_count":38,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":5,"forks":11,"open_issues":5,"watchers":38,"default_branch":"release"}},"base":{"label":"percona:release-1.1","ref":"release-1.1","sha":"a10c7213017252e571d3264b603fa33e7ae17d88","user":{"login":"percona","id":1683025,"avatar_url":"https://avatars.githubusercontent.com/u/1683025?v=3","gravatar_id":"","url":"https://api.github.com/users/percona","html_url":"https://github.com/percona","followers_url":"https://api.github.com/users/percona/followers","following_url":"https://api.github.com/users/percona/following{/other_user}","gists_url":"https://api.github.com/users/percona/gists{/gist_id}","starred_url":"https://api.github.com/users/percona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percona/subscriptions","organizations_url":"https://api.github.com/users/percona/orgs","repos_url":"https://api.github.com/users/percona/repos","events_url":"https://api.github.com/users/percona/events{/privacy}","received_events_url":"https://api.github.com/users/percona/received_events","type":"Organization","site_admin":false},"repo":{"id":11132795,"name":"percona-agent","full_name":"percona/percona-agent","owner":{"login":"percona","id":1683025,"avatar_url":"https://avatars.githubusercontent.com/u/1683025?v=3","gravatar_id":"","url":"https://api.github.com/users/percona","html_url":"https://github.com/percona","followers_url":"https://api.github.com/users/percona/followers","following_url":"https://api.github.com/users/percona/following{/other_user}","gists_url":"https://api.github.com/users/percona/gists{/gist_id}","starred_url":"https://api.github.com/users/percona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percona/subscriptions","organizations_url":"https://api.github.com/users/percona/orgs","repos_url":"https://api.github.com/users/percona/repos","events_url":"https://api.github.com/users/percona/events{/privacy}","received_events_url":"https://api.github.com/users/percona/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/percona/percona-agent","description":"Percona Cloud Tools Agent","fork":false,"url":"https://api.github.com/repos/percona/percona-agent","forks_url":"https://api.github.com/repos/percona/percona-agent/forks","keys_url":"https://api.github.com/repos/percona/percona-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/percona/percona-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/percona/percona-agent/teams","hooks_url":"https://api.github.com/repos/percona/percona-agent/hooks","issue_events_url":"https://api.github.com/repos/percona/percona-agent/issues/events{/number}","events_url":"https://api.github.com/repos/percona/percona-agent/events","assignees_url":"https://api.github.com/repos/percona/percona-agent/assignees{/user}","branches_url":"https://api.github.com/repos/percona/percona-agent/branches{/branch}","tags_url":"https://api.github.com/repos/percona/percona-agent/tags","blobs_url":"https://api.github.com/repos/percona/percona-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/percona/percona-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/percona/percona-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/percona/percona-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/percona/percona-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/percona/percona-agent/languages","stargazers_url":"https://api.github.com/repos/percona/percona-agent/stargazers","contributors_url":"https://api.github.com/repos/percona/percona-agent/contributors","subscribers_url":"https://api.github.com/repos/percona/percona-agent/subscribers","subscription_url":"https://api.github.com/repos/percona/percona-agent/subscription","commits_url":"https://api.github.com/repos/percona/percona-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/percona/percona-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/percona/percona-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/percona/percona-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/percona/percona-agent/contents/{+path}","compare_url":"https://api.github.com/repos/percona/percona-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/percona/percona-agent/merges","archive_url":"https://api.github.com/repos/percona/percona-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/percona/percona-agent/downloads","issues_url":"https://api.github.com/repos/percona/percona-agent/issues{/number}","pulls_url":"https://api.github.com/repos/percona/percona-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/percona/percona-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/percona/percona-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/percona/percona-agent/labels{/name}","releases_url":"https://api.github.com/repos/percona/percona-agent/releases{/id}","created_at":"2013-07-02T19:09:37Z","updated_at":"2015-04-23T16:37:23Z","pushed_at":"2015-04-28T17:11:27Z","git_url":"git://github.com/percona/percona-agent.git","ssh_url":"git@github.com:percona/percona-agent.git","clone_url":"https://github.com/percona/percona-agent.git","svn_url":"https://github.com/percona/percona-agent","homepage":"","size":13684,"stargazers_count":38,"watchers_count":38,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":5,"forks":11,"open_issues":5,"watchers":38,"default_branch":"release"}},"_links":{"self":{"href":"https://api.github.com/repos/percona/percona-agent/pulls/171"},"html":{"href":"https://github.com/percona/percona-agent/pull/171"},"issue":{"href":"https://api.github.com/repos/percona/percona-agent/issues/171"},"comments":{"href":"https://api.github.com/repos/percona/percona-agent/issues/171/comments"},"review_comments":{"href":"https://api.github.com/repos/percona/percona-agent/pulls/171/comments"},"review_comment":{"href":"https://api.github.com/repos/percona/percona-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/percona/percona-agent/pulls/171/commits"},"statuses":{"href":"https://api.github.com/repos/percona/percona-agent/statuses/c6f79ed9dc5bd9a572891c57fd592cc4f84f2008"}}}}