{"action":"opened","number":872,"pull_request":{"url":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/872","id":54515958,"html_url":"https://github.com/ClusterLabs/pacemaker/pull/872","diff_url":"https://github.com/ClusterLabs/pacemaker/pull/872.diff","patch_url":"https://github.com/ClusterLabs/pacemaker/pull/872.patch","issue_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/872","number":872,"state":"open","locked":false,"title":"FOR REVIEW ONLY","user":{"login":"kgaillot","id":8730570,"avatar_url":"https://avatars.githubusercontent.com/u/8730570?v=3","gravatar_id":"","url":"https://api.github.com/users/kgaillot","html_url":"https://github.com/kgaillot","followers_url":"https://api.github.com/users/kgaillot/followers","following_url":"https://api.github.com/users/kgaillot/following{/other_user}","gists_url":"https://api.github.com/users/kgaillot/gists{/gist_id}","starred_url":"https://api.github.com/users/kgaillot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgaillot/subscriptions","organizations_url":"https://api.github.com/users/kgaillot/orgs","repos_url":"https://api.github.com/users/kgaillot/repos","events_url":"https://api.github.com/users/kgaillot/events{/privacy}","received_events_url":"https://api.github.com/users/kgaillot/received_events","type":"User","site_admin":false},"body":"DO NOT MERGE - for review only\r\n\r\nThis is the complete pacemaker_remote side of a graceful stop. The cluster side is yet to be implemented.\r\n\r\nThe process on the pacemaker_remote side is:\r\n1. pacemaker_remote catches SIGTERM (sent by systemctl stop)\r\n2. If there is no IPC proxy provider (remote connection from cluster), exit immediately.\r\n3. Otherwise send a new lrmd IPC op, \"shutdown_req\", to the proxy provider, set a global flag indicating we're shutting down, and set a short (20-second) timer.\r\n4. If the cluster acknowledges the request, defuse the timer. If the timer pops, exit immediately. (This allows us to handle the case where the cluster host is running an older version that doesn't support this new functionality.)\r\n5. Once all IPC proxy providers have disconnected, exit immediately.\r\n\r\nI have tested through the crmd receiving the shutdown request. Crmd does not yet acknowledge it, so pacemaker_remote times out and exits.\r\n\r\nThe plan for the crmd side is to put the remote node into standby mode, and require the user to manually take the node out of standby once they're done doing whatever they're doing.\r\n\r\nThis will involve another change. Currently, if a cluster node is in standby, it can be stopped/rebooted/whatever and not get fenced. However, a remote node in standby will get fenced if pacemaker_remote is stopped. So the necessary change will be to make remote node standby stop the remote connection, and unstandby start it.\r\n\r\nOne other minor change is that the pacemaker_remote systemd unit file will need a long stop timeout, probably similar to pacemaker's. (Currently it is 30s.)\r\n\r\nAn alternative to using standby mode would be to use the \"shutdown\" transient node attribute that is used for cluster node shutdown. Crmd would set the shutdown attribute, and pengine would stop the remote connection. However this would likely be more complicated, and not as obvious for the user how to clear afterward (standby mode is clearly shown in pcs status, and most users are familiar with unstandby to clear it).","created_at":"2015-12-23T23:41:27Z","updated_at":"2015-12-23T23:41:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/872/commits","review_comments_url":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/872/comments","review_comment_url":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/872/comments","statuses_url":"https://api.github.com/repos/ClusterLabs/pacemaker/statuses/3c8d568762c87b9f8b8977b2ae2131e98ef2e82b","head":{"label":"kgaillot:graceful","ref":"graceful","sha":"3c8d568762c87b9f8b8977b2ae2131e98ef2e82b","user":{"login":"kgaillot","id":8730570,"avatar_url":"https://avatars.githubusercontent.com/u/8730570?v=3","gravatar_id":"","url":"https://api.github.com/users/kgaillot","html_url":"https://github.com/kgaillot","followers_url":"https://api.github.com/users/kgaillot/followers","following_url":"https://api.github.com/users/kgaillot/following{/other_user}","gists_url":"https://api.github.com/users/kgaillot/gists{/gist_id}","starred_url":"https://api.github.com/users/kgaillot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgaillot/subscriptions","organizations_url":"https://api.github.com/users/kgaillot/orgs","repos_url":"https://api.github.com/users/kgaillot/repos","events_url":"https://api.github.com/users/kgaillot/events{/privacy}","received_events_url":"https://api.github.com/users/kgaillot/received_events","type":"User","site_admin":false},"repo":{"id":28232671,"name":"pacemaker","full_name":"kgaillot/pacemaker","owner":{"login":"kgaillot","id":8730570,"avatar_url":"https://avatars.githubusercontent.com/u/8730570?v=3","gravatar_id":"","url":"https://api.github.com/users/kgaillot","html_url":"https://github.com/kgaillot","followers_url":"https://api.github.com/users/kgaillot/followers","following_url":"https://api.github.com/users/kgaillot/following{/other_user}","gists_url":"https://api.github.com/users/kgaillot/gists{/gist_id}","starred_url":"https://api.github.com/users/kgaillot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgaillot/subscriptions","organizations_url":"https://api.github.com/users/kgaillot/orgs","repos_url":"https://api.github.com/users/kgaillot/repos","events_url":"https://api.github.com/users/kgaillot/events{/privacy}","received_events_url":"https://api.github.com/users/kgaillot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kgaillot/pacemaker","description":"Pacemaker is an advanced, scalable High-Availability cluster resource manager","fork":true,"url":"https://api.github.com/repos/kgaillot/pacemaker","forks_url":"https://api.github.com/repos/kgaillot/pacemaker/forks","keys_url":"https://api.github.com/repos/kgaillot/pacemaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kgaillot/pacemaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kgaillot/pacemaker/teams","hooks_url":"https://api.github.com/repos/kgaillot/pacemaker/hooks","issue_events_url":"https://api.github.com/repos/kgaillot/pacemaker/issues/events{/number}","events_url":"https://api.github.com/repos/kgaillot/pacemaker/events","assignees_url":"https://api.github.com/repos/kgaillot/pacemaker/assignees{/user}","branches_url":"https://api.github.com/repos/kgaillot/pacemaker/branches{/branch}","tags_url":"https://api.github.com/repos/kgaillot/pacemaker/tags","blobs_url":"https://api.github.com/repos/kgaillot/pacemaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kgaillot/pacemaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kgaillot/pacemaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/kgaillot/pacemaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kgaillot/pacemaker/statuses/{sha}","languages_url":"https://api.github.com/repos/kgaillot/pacemaker/languages","stargazers_url":"https://api.github.com/repos/kgaillot/pacemaker/stargazers","contributors_url":"https://api.github.com/repos/kgaillot/pacemaker/contributors","subscribers_url":"https://api.github.com/repos/kgaillot/pacemaker/subscribers","subscription_url":"https://api.github.com/repos/kgaillot/pacemaker/subscription","commits_url":"https://api.github.com/repos/kgaillot/pacemaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/kgaillot/pacemaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/kgaillot/pacemaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/kgaillot/pacemaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/kgaillot/pacemaker/contents/{+path}","compare_url":"https://api.github.com/repos/kgaillot/pacemaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kgaillot/pacemaker/merges","archive_url":"https://api.github.com/repos/kgaillot/pacemaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kgaillot/pacemaker/downloads","issues_url":"https://api.github.com/repos/kgaillot/pacemaker/issues{/number}","pulls_url":"https://api.github.com/repos/kgaillot/pacemaker/pulls{/number}","milestones_url":"https://api.github.com/repos/kgaillot/pacemaker/milestones{/number}","notifications_url":"https://api.github.com/repos/kgaillot/pacemaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kgaillot/pacemaker/labels{/name}","releases_url":"https://api.github.com/repos/kgaillot/pacemaker/releases{/id}","created_at":"2014-12-19T14:33:03Z","updated_at":"2015-05-08T18:21:35Z","pushed_at":"2015-12-23T23:27:19Z","git_url":"git://github.com/kgaillot/pacemaker.git","ssh_url":"git@github.com:kgaillot/pacemaker.git","clone_url":"https://github.com/kgaillot/pacemaker.git","svn_url":"https://github.com/kgaillot/pacemaker","homepage":"http://www.clusterlabs.org","size":135515,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ClusterLabs:master","ref":"master","sha":"a9467e511ebf201c187b6b8bc4fea6415c1a8432","user":{"login":"ClusterLabs","id":574912,"avatar_url":"https://avatars.githubusercontent.com/u/574912?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterLabs","html_url":"https://github.com/ClusterLabs","followers_url":"https://api.github.com/users/ClusterLabs/followers","following_url":"https://api.github.com/users/ClusterLabs/following{/other_user}","gists_url":"https://api.github.com/users/ClusterLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterLabs/subscriptions","organizations_url":"https://api.github.com/users/ClusterLabs/orgs","repos_url":"https://api.github.com/users/ClusterLabs/repos","events_url":"https://api.github.com/users/ClusterLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2304962,"name":"pacemaker","full_name":"ClusterLabs/pacemaker","owner":{"login":"ClusterLabs","id":574912,"avatar_url":"https://avatars.githubusercontent.com/u/574912?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterLabs","html_url":"https://github.com/ClusterLabs","followers_url":"https://api.github.com/users/ClusterLabs/followers","following_url":"https://api.github.com/users/ClusterLabs/following{/other_user}","gists_url":"https://api.github.com/users/ClusterLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterLabs/subscriptions","organizations_url":"https://api.github.com/users/ClusterLabs/orgs","repos_url":"https://api.github.com/users/ClusterLabs/repos","events_url":"https://api.github.com/users/ClusterLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterLabs/pacemaker","description":"Pacemaker is an advanced, scalable High-Availability cluster resource manager","fork":false,"url":"https://api.github.com/repos/ClusterLabs/pacemaker","forks_url":"https://api.github.com/repos/ClusterLabs/pacemaker/forks","keys_url":"https://api.github.com/repos/ClusterLabs/pacemaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterLabs/pacemaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterLabs/pacemaker/teams","hooks_url":"https://api.github.com/repos/ClusterLabs/pacemaker/hooks","issue_events_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterLabs/pacemaker/events","assignees_url":"https://api.github.com/repos/ClusterLabs/pacemaker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterLabs/pacemaker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterLabs/pacemaker/tags","blobs_url":"https://api.github.com/repos/ClusterLabs/pacemaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterLabs/pacemaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterLabs/pacemaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterLabs/pacemaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterLabs/pacemaker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterLabs/pacemaker/languages","stargazers_url":"https://api.github.com/repos/ClusterLabs/pacemaker/stargazers","contributors_url":"https://api.github.com/repos/ClusterLabs/pacemaker/contributors","subscribers_url":"https://api.github.com/repos/ClusterLabs/pacemaker/subscribers","subscription_url":"https://api.github.com/repos/ClusterLabs/pacemaker/subscription","commits_url":"https://api.github.com/repos/ClusterLabs/pacemaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterLabs/pacemaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterLabs/pacemaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterLabs/pacemaker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterLabs/pacemaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterLabs/pacemaker/merges","archive_url":"https://api.github.com/repos/ClusterLabs/pacemaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterLabs/pacemaker/downloads","issues_url":"https://api.github.com/repos/ClusterLabs/pacemaker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterLabs/pacemaker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterLabs/pacemaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterLabs/pacemaker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterLabs/pacemaker/releases{/id}","created_at":"2011-09-01T00:08:16Z","updated_at":"2015-12-18T09:07:17Z","pushed_at":"2015-12-23T23:41:28Z","git_url":"git://github.com/ClusterLabs/pacemaker.git","ssh_url":"git@github.com:ClusterLabs/pacemaker.git","clone_url":"https://github.com/ClusterLabs/pacemaker.git","svn_url":"https://github.com/ClusterLabs/pacemaker","homepage":"http://www.clusterlabs.org","size":148357,"stargazers_count":276,"watchers_count":276,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":11,"forks":139,"open_issues":11,"watchers":276,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/872"},"html":{"href":"https://github.com/ClusterLabs/pacemaker/pull/872"},"issue":{"href":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/872"},"comments":{"href":"https://api.github.com/repos/ClusterLabs/pacemaker/issues/872/comments"},"review_comments":{"href":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/872/comments"},"review_comment":{"href":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ClusterLabs/pacemaker/pulls/872/commits"},"statuses":{"href":"https://api.github.com/repos/ClusterLabs/pacemaker/statuses/3c8d568762c87b9f8b8977b2ae2131e98ef2e82b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":7,"additions":258,"deletions":61,"changed_files":11}}