{"action":"opened","number":617,"pull_request":{"url":"https://api.github.com/repos/apache/brooklyn-server/pulls/617","id":113873595,"html_url":"https://github.com/apache/brooklyn-server/pull/617","diff_url":"https://github.com/apache/brooklyn-server/pull/617.diff","patch_url":"https://github.com/apache/brooklyn-server/pull/617.patch","issue_url":"https://api.github.com/repos/apache/brooklyn-server/issues/617","number":617,"state":"open","locked":false,"title":"Persist management plane ID","user":{"login":"neykov","id":3612111,"avatar_url":"https://avatars1.githubusercontent.com/u/3612111?v=3","gravatar_id":"","url":"https://api.github.com/users/neykov","html_url":"https://github.com/neykov","followers_url":"https://api.github.com/users/neykov/followers","following_url":"https://api.github.com/users/neykov/following{/other_user}","gists_url":"https://api.github.com/users/neykov/gists{/gist_id}","starred_url":"https://api.github.com/users/neykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neykov/subscriptions","organizations_url":"https://api.github.com/users/neykov/orgs","repos_url":"https://api.github.com/users/neykov/repos","events_url":"https://api.github.com/users/neykov/events{/privacy}","received_events_url":"https://api.github.com/users/neykov/received_events","type":"User","site_admin":false},"body":"Some considerations on where to place the planeId initialisation:\r\n * BrooklynMemento (RebindManager). `planeId` will be available only after rebind, so it will\r\n   be available to MASTER nodes only (and potentially HOT_STANDBY)\r\n * ManagementPlaneSyncRecord (HighAvailabilityManager). Used only when HA is enabled. When HA is disabled\r\n   HighAvailabilityManager is not initialised, doesn't access the store at all, no\r\n   records are getting written.\r\n * Separate init step in BrooklynLauncher. Early in the lifecycle so users need not to care\r\n   too much when they are allowed to read it. On the other hand it's not encapsulated so\r\n   need to touch all places that use persistence (i.e. launcher, copy-state, backup). Can\r\n   only read from the store at this point, write access is not enabled yet. If HA is configured\r\n   store writes are enabled only after becoming master. Writing to the store in this case would\r\n   be risky, even if we know that it's a clean state (no planeId file). Better leave only the\r\n   master update the store.\r\n\r\nBecause of the above I decided to go for a mixed approach:\r\n  * persist the `planeId` immediately after starting persistence (i.e. MASTER when HA) and repeat hourly\r\n  * don't overwrite persisted store `planeId` if different\r\n  * init `planeId` as part of the rebind sequence; if no `planeId` exists in store generate one\r\n  * init `planeId` when reading the management records so we have it initialized for non-`MASTER` nodes as well; don't generate one if not in persisted store","created_at":"2017-04-03T07:45:47Z","updated_at":"2017-04-03T07:45:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/617/commits","review_comments_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/617/comments","review_comment_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/issues/617/comments","statuses_url":"https://api.github.com/repos/apache/brooklyn-server/statuses/701c716aa27dbc3999c9c2fdd728e09089448b1a","head":{"label":"neykov:plane-id","ref":"plane-id","sha":"701c716aa27dbc3999c9c2fdd728e09089448b1a","user":{"login":"neykov","id":3612111,"avatar_url":"https://avatars1.githubusercontent.com/u/3612111?v=3","gravatar_id":"","url":"https://api.github.com/users/neykov","html_url":"https://github.com/neykov","followers_url":"https://api.github.com/users/neykov/followers","following_url":"https://api.github.com/users/neykov/following{/other_user}","gists_url":"https://api.github.com/users/neykov/gists{/gist_id}","starred_url":"https://api.github.com/users/neykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neykov/subscriptions","organizations_url":"https://api.github.com/users/neykov/orgs","repos_url":"https://api.github.com/users/neykov/repos","events_url":"https://api.github.com/users/neykov/events{/privacy}","received_events_url":"https://api.github.com/users/neykov/received_events","type":"User","site_admin":false},"repo":{"id":51353324,"name":"brooklyn-server","full_name":"neykov/brooklyn-server","owner":{"login":"neykov","id":3612111,"avatar_url":"https://avatars1.githubusercontent.com/u/3612111?v=3","gravatar_id":"","url":"https://api.github.com/users/neykov","html_url":"https://github.com/neykov","followers_url":"https://api.github.com/users/neykov/followers","following_url":"https://api.github.com/users/neykov/following{/other_user}","gists_url":"https://api.github.com/users/neykov/gists{/gist_id}","starred_url":"https://api.github.com/users/neykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neykov/subscriptions","organizations_url":"https://api.github.com/users/neykov/orgs","repos_url":"https://api.github.com/users/neykov/repos","events_url":"https://api.github.com/users/neykov/events{/privacy}","received_events_url":"https://api.github.com/users/neykov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neykov/brooklyn-server","description":"Mirror of Apache Brooklyn server","fork":true,"url":"https://api.github.com/repos/neykov/brooklyn-server","forks_url":"https://api.github.com/repos/neykov/brooklyn-server/forks","keys_url":"https://api.github.com/repos/neykov/brooklyn-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neykov/brooklyn-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neykov/brooklyn-server/teams","hooks_url":"https://api.github.com/repos/neykov/brooklyn-server/hooks","issue_events_url":"https://api.github.com/repos/neykov/brooklyn-server/issues/events{/number}","events_url":"https://api.github.com/repos/neykov/brooklyn-server/events","assignees_url":"https://api.github.com/repos/neykov/brooklyn-server/assignees{/user}","branches_url":"https://api.github.com/repos/neykov/brooklyn-server/branches{/branch}","tags_url":"https://api.github.com/repos/neykov/brooklyn-server/tags","blobs_url":"https://api.github.com/repos/neykov/brooklyn-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neykov/brooklyn-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neykov/brooklyn-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/neykov/brooklyn-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neykov/brooklyn-server/statuses/{sha}","languages_url":"https://api.github.com/repos/neykov/brooklyn-server/languages","stargazers_url":"https://api.github.com/repos/neykov/brooklyn-server/stargazers","contributors_url":"https://api.github.com/repos/neykov/brooklyn-server/contributors","subscribers_url":"https://api.github.com/repos/neykov/brooklyn-server/subscribers","subscription_url":"https://api.github.com/repos/neykov/brooklyn-server/subscription","commits_url":"https://api.github.com/repos/neykov/brooklyn-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/neykov/brooklyn-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/neykov/brooklyn-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/neykov/brooklyn-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/neykov/brooklyn-server/contents/{+path}","compare_url":"https://api.github.com/repos/neykov/brooklyn-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neykov/brooklyn-server/merges","archive_url":"https://api.github.com/repos/neykov/brooklyn-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neykov/brooklyn-server/downloads","issues_url":"https://api.github.com/repos/neykov/brooklyn-server/issues{/number}","pulls_url":"https://api.github.com/repos/neykov/brooklyn-server/pulls{/number}","milestones_url":"https://api.github.com/repos/neykov/brooklyn-server/milestones{/number}","notifications_url":"https://api.github.com/repos/neykov/brooklyn-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neykov/brooklyn-server/labels{/name}","releases_url":"https://api.github.com/repos/neykov/brooklyn-server/releases{/id}","deployments_url":"https://api.github.com/repos/neykov/brooklyn-server/deployments","created_at":"2016-02-09T07:49:27Z","updated_at":"2016-02-09T07:49:35Z","pushed_at":"2017-04-03T07:33:07Z","git_url":"git://github.com/neykov/brooklyn-server.git","ssh_url":"git@github.com:neykov/brooklyn-server.git","clone_url":"https://github.com/neykov/brooklyn-server.git","svn_url":"https://github.com/neykov/brooklyn-server","homepage":null,"size":33739,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"1599d7aaadc1e72161fb44ba23572c337513739b","user":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":47246081,"name":"brooklyn-server","full_name":"apache/brooklyn-server","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/brooklyn-server","description":"Mirror of Apache Brooklyn server","fork":false,"url":"https://api.github.com/repos/apache/brooklyn-server","forks_url":"https://api.github.com/repos/apache/brooklyn-server/forks","keys_url":"https://api.github.com/repos/apache/brooklyn-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/brooklyn-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/brooklyn-server/teams","hooks_url":"https://api.github.com/repos/apache/brooklyn-server/hooks","issue_events_url":"https://api.github.com/repos/apache/brooklyn-server/issues/events{/number}","events_url":"https://api.github.com/repos/apache/brooklyn-server/events","assignees_url":"https://api.github.com/repos/apache/brooklyn-server/assignees{/user}","branches_url":"https://api.github.com/repos/apache/brooklyn-server/branches{/branch}","tags_url":"https://api.github.com/repos/apache/brooklyn-server/tags","blobs_url":"https://api.github.com/repos/apache/brooklyn-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/brooklyn-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/brooklyn-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/brooklyn-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/brooklyn-server/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/brooklyn-server/languages","stargazers_url":"https://api.github.com/repos/apache/brooklyn-server/stargazers","contributors_url":"https://api.github.com/repos/apache/brooklyn-server/contributors","subscribers_url":"https://api.github.com/repos/apache/brooklyn-server/subscribers","subscription_url":"https://api.github.com/repos/apache/brooklyn-server/subscription","commits_url":"https://api.github.com/repos/apache/brooklyn-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/brooklyn-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/brooklyn-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/brooklyn-server/contents/{+path}","compare_url":"https://api.github.com/repos/apache/brooklyn-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/brooklyn-server/merges","archive_url":"https://api.github.com/repos/apache/brooklyn-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/brooklyn-server/downloads","issues_url":"https://api.github.com/repos/apache/brooklyn-server/issues{/number}","pulls_url":"https://api.github.com/repos/apache/brooklyn-server/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/brooklyn-server/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/brooklyn-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/brooklyn-server/labels{/name}","releases_url":"https://api.github.com/repos/apache/brooklyn-server/releases{/id}","deployments_url":"https://api.github.com/repos/apache/brooklyn-server/deployments","created_at":"2015-12-02T08:00:06Z","updated_at":"2017-03-30T16:04:01Z","pushed_at":"2017-04-01T09:20:15Z","git_url":"git://github.com/apache/brooklyn-server.git","ssh_url":"git@github.com:apache/brooklyn-server.git","clone_url":"https://github.com/apache/brooklyn-server.git","svn_url":"https://github.com/apache/brooklyn-server","homepage":null,"size":34133,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":"git://git.apache.org/brooklyn-server.git","open_issues_count":17,"forks":44,"open_issues":17,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/617"},"html":{"href":"https://github.com/apache/brooklyn-server/pull/617"},"issue":{"href":"https://api.github.com/repos/apache/brooklyn-server/issues/617"},"comments":{"href":"https://api.github.com/repos/apache/brooklyn-server/issues/617/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/617/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/617/commits"},"statuses":{"href":"https://api.github.com/repos/apache/brooklyn-server/statuses/701c716aa27dbc3999c9c2fdd728e09089448b1a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":593,"deletions":41,"changed_files":35}}
{"actor":{"display_login":"neykov"}}