{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/219470517","pull_request_review_id":157655555,"id":219470517,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTQ3MDUxNw==","diff_hunk":"@@ -101,35 +107,46 @@ func (f *FSM) extend(key lease.Key, holder string, duration time.Duration) *resp\n \treturn &response{}\n }\n \n+func (f *FSM) pin(key lease.Key) *response {\n+\tf.pinned[key] = true\n+\treturn &response{}\n+}\n+\n+func (f *FSM) unpin(key lease.Key) *response {\n+\tdelete(f.pinned, key)\n+\treturn &response{}","path":"core/raftlease/fsm.go","position":56,"original_position":56,"commit_id":"485af642c37af2a486b49b6bf70df6217498886b","original_commit_id":"485af642c37af2a486b49b6bf70df6217498886b","user":{"login":"manadart","id":562661,"node_id":"MDQ6VXNlcjU2MjY2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/562661?v=4","gravatar_id":"","url":"https://api.github.com/users/manadart","html_url":"https://github.com/manadart","followers_url":"https://api.github.com/users/manadart/followers","following_url":"https://api.github.com/users/manadart/following{/other_user}","gists_url":"https://api.github.com/users/manadart/gists{/gist_id}","starred_url":"https://api.github.com/users/manadart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manadart/subscriptions","organizations_url":"https://api.github.com/users/manadart/orgs","repos_url":"https://api.github.com/users/manadart/repos","events_url":"https://api.github.com/users/manadart/events{/privacy}","received_events_url":"https://api.github.com/users/manadart/received_events","type":"User","site_admin":false},"body":"I think it is worth leaving for now and revisiting when we think more about a mechanism for preventing instant lease expiry when leases are unpinned.","created_at":"2018-09-21T11:49:03Z","updated_at":"2018-09-21T11:49:03Z","html_url":"https://github.com/juju/juju/pull/9243#discussion_r219470517","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/9243","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/219470517"},"html":{"href":"https://github.com/juju/juju/pull/9243#discussion_r219470517"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/9243"}},"in_reply_to_id":219176082},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/9243","id":216979766,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2OTc5NzY2","html_url":"https://github.com/juju/juju/pull/9243","diff_url":"https://github.com/juju/juju/pull/9243.diff","patch_url":"https://github.com/juju/juju/pull/9243.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/9243","number":9243,"state":"open","locked":false,"title":"FSM Logic for Pinning Leases","user":{"login":"manadart","id":562661,"node_id":"MDQ6VXNlcjU2MjY2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/562661?v=4","gravatar_id":"","url":"https://api.github.com/users/manadart","html_url":"https://github.com/manadart","followers_url":"https://api.github.com/users/manadart/followers","following_url":"https://api.github.com/users/manadart/following{/other_user}","gists_url":"https://api.github.com/users/manadart/gists{/gist_id}","starred_url":"https://api.github.com/users/manadart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manadart/subscriptions","organizations_url":"https://api.github.com/users/manadart/orgs","repos_url":"https://api.github.com/users/manadart/repos","events_url":"https://api.github.com/users/manadart/events{/privacy}","received_events_url":"https://api.github.com/users/manadart/received_events","type":"User","site_admin":false},"body":"## Description of change\r\n\r\nThis patch adds logic to the Raft FSM implementation for pinning leases.\r\n\r\nThe new logic is not yet recruited by any work-flows, so Juju behaviour remains unchanged by it. Further patches in the series will follow, that use pinning.\r\n\r\nDepends on https://github.com/juju/juju/pull/9207\r\n\r\n## QA steps\r\n\r\nBootstrap, deploy multiple application units, check that leadership works as before.\r\n\r\n## Documentation changes\r\n\r\nNone yet.\r\n\r\n## Bug reference\r\n\r\nN/A\r\n","created_at":"2018-09-20T13:50:48Z","updated_at":"2018-09-21T11:49:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7990b60ebe17b2323c1d9792a0ccb464c6f0b2b4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/9243/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/9243/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/9243/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/485af642c37af2a486b49b6bf70df6217498886b","head":{"label":"manadart:pin-leadership-implementation","ref":"pin-leadership-implementation","sha":"485af642c37af2a486b49b6bf70df6217498886b","user":{"login":"manadart","id":562661,"node_id":"MDQ6VXNlcjU2MjY2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/562661?v=4","gravatar_id":"","url":"https://api.github.com/users/manadart","html_url":"https://github.com/manadart","followers_url":"https://api.github.com/users/manadart/followers","following_url":"https://api.github.com/users/manadart/following{/other_user}","gists_url":"https://api.github.com/users/manadart/gists{/gist_id}","starred_url":"https://api.github.com/users/manadart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manadart/subscriptions","organizations_url":"https://api.github.com/users/manadart/orgs","repos_url":"https://api.github.com/users/manadart/repos","events_url":"https://api.github.com/users/manadart/events{/privacy}","received_events_url":"https://api.github.com/users/manadart/received_events","type":"User","site_admin":false},"repo":{"id":113540853,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM1NDA4NTM=","name":"juju","full_name":"manadart/juju","private":false,"owner":{"login":"manadart","id":562661,"node_id":"MDQ6VXNlcjU2MjY2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/562661?v=4","gravatar_id":"","url":"https://api.github.com/users/manadart","html_url":"https://github.com/manadart","followers_url":"https://api.github.com/users/manadart/followers","following_url":"https://api.github.com/users/manadart/following{/other_user}","gists_url":"https://api.github.com/users/manadart/gists{/gist_id}","starred_url":"https://api.github.com/users/manadart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manadart/subscriptions","organizations_url":"https://api.github.com/users/manadart/orgs","repos_url":"https://api.github.com/users/manadart/repos","events_url":"https://api.github.com/users/manadart/events{/privacy}","received_events_url":"https://api.github.com/users/manadart/received_events","type":"User","site_admin":false},"html_url":"https://github.com/manadart/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/manadart/juju","forks_url":"https://api.github.com/repos/manadart/juju/forks","keys_url":"https://api.github.com/repos/manadart/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manadart/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manadart/juju/teams","hooks_url":"https://api.github.com/repos/manadart/juju/hooks","issue_events_url":"https://api.github.com/repos/manadart/juju/issues/events{/number}","events_url":"https://api.github.com/repos/manadart/juju/events","assignees_url":"https://api.github.com/repos/manadart/juju/assignees{/user}","branches_url":"https://api.github.com/repos/manadart/juju/branches{/branch}","tags_url":"https://api.github.com/repos/manadart/juju/tags","blobs_url":"https://api.github.com/repos/manadart/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manadart/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manadart/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/manadart/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manadart/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/manadart/juju/languages","stargazers_url":"https://api.github.com/repos/manadart/juju/stargazers","contributors_url":"https://api.github.com/repos/manadart/juju/contributors","subscribers_url":"https://api.github.com/repos/manadart/juju/subscribers","subscription_url":"https://api.github.com/repos/manadart/juju/subscription","commits_url":"https://api.github.com/repos/manadart/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/manadart/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/manadart/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/manadart/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/manadart/juju/contents/{+path}","compare_url":"https://api.github.com/repos/manadart/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manadart/juju/merges","archive_url":"https://api.github.com/repos/manadart/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manadart/juju/downloads","issues_url":"https://api.github.com/repos/manadart/juju/issues{/number}","pulls_url":"https://api.github.com/repos/manadart/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/manadart/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/manadart/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manadart/juju/labels{/name}","releases_url":"https://api.github.com/repos/manadart/juju/releases{/id}","deployments_url":"https://api.github.com/repos/manadart/juju/deployments","created_at":"2017-12-08T06:38:11Z","updated_at":"2018-09-21T11:38:41Z","pushed_at":"2018-09-21T11:38:39Z","git_url":"git://github.com/manadart/juju.git","ssh_url":"git@github.com:manadart/juju.git","clone_url":"https://github.com/manadart/juju.git","svn_url":"https://github.com/manadart/juju","homepage":"juju.ubuntu.com","size":228374,"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":{"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","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"juju:develop","ref":"develop","sha":"32b0ad22b8d3189bb50c820b43c1a13c4c1e17be","user":{"login":"juju","id":4604548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2MDQ1NDg=","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,"node_id":"MDEwOlJlcG9zaXRvcnkyMDQ0NTk0Nw==","name":"juju","full_name":"juju/juju","private":false,"owner":{"login":"juju","id":4604548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2MDQ1NDg=","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},"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-09-21T11:15:19Z","pushed_at":"2018-09-21T11:43:27Z","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":228736,"stargazers_count":1236,"watchers_count":1236,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":286,"mirror_url":null,"archived":false,"open_issues_count":23,"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","node_id":"MDc6TGljZW5zZTE="},"forks":286,"open_issues":23,"watchers":1236,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/9243"},"html":{"href":"https://github.com/juju/juju/pull/9243"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/9243"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/9243/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/9243/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/9243/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/485af642c37af2a486b49b6bf70df6217498886b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"manadart"}}