{"action":"closed","number":219,"pull_request":{"url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/219","id":48906979,"html_url":"https://github.com/Metaswitch/clearwater-etcd/pull/219","diff_url":"https://github.com/Metaswitch/clearwater-etcd/pull/219.diff","patch_url":"https://github.com/Metaswitch/clearwater-etcd/pull/219.patch","issue_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/219","number":219,"state":"closed","locked":false,"title":"[Reviewer: Alex] Lock the PIDfile, to prevent multiple processes running at once","user":{"login":"rkd-msw","id":4363492,"avatar_url":"https://avatars.githubusercontent.com/u/4363492?v=3","gravatar_id":"","url":"https://api.github.com/users/rkd-msw","html_url":"https://github.com/rkd-msw","followers_url":"https://api.github.com/users/rkd-msw/followers","following_url":"https://api.github.com/users/rkd-msw/following{/other_user}","gists_url":"https://api.github.com/users/rkd-msw/gists{/gist_id}","starred_url":"https://api.github.com/users/rkd-msw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkd-msw/subscriptions","organizations_url":"https://api.github.com/users/rkd-msw/orgs","repos_url":"https://api.github.com/users/rkd-msw/repos","events_url":"https://api.github.com/users/rkd-msw/events{/privacy}","received_events_url":"https://api.github.com/users/rkd-msw/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/Metaswitch/clearwater-etcd/issues/218 along with https://github.com/Metaswitch/python-common/pull/31. I've tested live:\r\n\r\n```\r\n/var/log/clearwater-cluster-manager/cluster-manager_20151027T170000Z.txt:27-10-2015 17:38:32.560 UTC INFO utils.py:411 (thread MainThread): Acquired exclusive lock on /var/run/clearwater-cluster-manager.pid\r\n/var/log/clearwater-cluster-manager/cluster-manager_20151027T170000Z.txt:27-10-2015 17:38:42.055 UTC ERROR utils.py:413 (thread MainThread): Lock on /var/run/clearwater-cluster-manager.pid is held by another process\r\n/var/log/clearwater-cluster-manager/cluster-manager_20151027T170000Z.txt:27-10-2015 17:38:57.978 UTC ERROR utils.py:413 (thread MainThread): Lock on /var/run/clearwater-cluster-manager.pid is held by another process\r\n/var/log/clearwater-cluster-manager/cluster-manager_20151027T170000Z.txt:27-10-2015 17:38:58.828 UTC ERROR utils.py:413 (thread MainThread): Lock on /var/run/clearwater-cluster-manager.pid is held by another process\r\n/var/log/clearwater-cluster-manager/cluster-manager_20151027T170000Z.txt:27-10-2015 17:38:59.462 UTC ERROR utils.py:413 (thread MainThread): Lock on /var/run/clearwater-cluster-manager.pid is held by another process\r\n/var/log/clearwater-cluster-manager/cluster-manager_20151027T170000Z.txt:27-10-2015 17:38:59.970 UTC ERROR utils.py:413 (thread MainThread): Lock on /var/run/clearwater-cluster-manager.pid is held by another process\r\n/var/log/clearwater-cluster-manager/cluster-manager_20151027T170000Z.txt:27-10-2015 17:39:00.394 UTC ERROR utils.py:413 (thread MainThread): Lock on /var/run/clearwater-cluster-manager.pid is held by another process\r\n```\r\n\r\nI can't think of any other process that need this (most acquire another sort of exclusive resource, e.g. by listening on a port). Let me know if you can.","created_at":"2015-10-27T17:47:54Z","updated_at":"2015-10-29T23:15:04Z","closed_at":"2015-10-29T23:15:04Z","merged_at":"2015-10-29T23:15:04Z","merge_commit_sha":"12dce0bd1e88a88601f4eaac87706153468095f3","assignee":{"login":"rkd-msw","id":4363492,"avatar_url":"https://avatars.githubusercontent.com/u/4363492?v=3","gravatar_id":"","url":"https://api.github.com/users/rkd-msw","html_url":"https://github.com/rkd-msw","followers_url":"https://api.github.com/users/rkd-msw/followers","following_url":"https://api.github.com/users/rkd-msw/following{/other_user}","gists_url":"https://api.github.com/users/rkd-msw/gists{/gist_id}","starred_url":"https://api.github.com/users/rkd-msw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkd-msw/subscriptions","organizations_url":"https://api.github.com/users/rkd-msw/orgs","repos_url":"https://api.github.com/users/rkd-msw/repos","events_url":"https://api.github.com/users/rkd-msw/events{/privacy}","received_events_url":"https://api.github.com/users/rkd-msw/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/219/commits","review_comments_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/219/comments","review_comment_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/219/comments","statuses_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/statuses/42552848e9cf51553175cfdeff77072b9e933acb","head":{"label":"Metaswitch:stop_multiple_starts","ref":"stop_multiple_starts","sha":"42552848e9cf51553175cfdeff77072b9e933acb","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":34358654,"name":"clearwater-etcd","full_name":"Metaswitch/clearwater-etcd","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/clearwater-etcd","description":"Wrappers around etcd for ease of integration into Project Clearwater","fork":false,"url":"https://api.github.com/repos/Metaswitch/clearwater-etcd","forks_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/forks","keys_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/teams","hooks_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/events","assignees_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/tags","blobs_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/subscription","commits_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/merges","archive_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/downloads","issues_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/releases{/id}","created_at":"2015-04-22T00:03:08Z","updated_at":"2015-05-11T10:20:37Z","pushed_at":"2015-10-29T23:15:04Z","git_url":"git://github.com/Metaswitch/clearwater-etcd.git","ssh_url":"git@github.com:Metaswitch/clearwater-etcd.git","clone_url":"https://github.com/Metaswitch/clearwater-etcd.git","svn_url":"https://github.com/Metaswitch/clearwater-etcd","homepage":null,"size":11507,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":19,"forks":2,"open_issues":19,"watchers":0,"default_branch":"master"}},"base":{"label":"Metaswitch:master","ref":"master","sha":"f4f3a65383d2b25c3851935c75934fcfc1f3593a","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":34358654,"name":"clearwater-etcd","full_name":"Metaswitch/clearwater-etcd","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/clearwater-etcd","description":"Wrappers around etcd for ease of integration into Project Clearwater","fork":false,"url":"https://api.github.com/repos/Metaswitch/clearwater-etcd","forks_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/forks","keys_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/teams","hooks_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/events","assignees_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/tags","blobs_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/subscription","commits_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/merges","archive_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/downloads","issues_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/clearwater-etcd/releases{/id}","created_at":"2015-04-22T00:03:08Z","updated_at":"2015-05-11T10:20:37Z","pushed_at":"2015-10-29T23:15:04Z","git_url":"git://github.com/Metaswitch/clearwater-etcd.git","ssh_url":"git@github.com:Metaswitch/clearwater-etcd.git","clone_url":"https://github.com/Metaswitch/clearwater-etcd.git","svn_url":"https://github.com/Metaswitch/clearwater-etcd","homepage":null,"size":11507,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":19,"forks":2,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/219"},"html":{"href":"https://github.com/Metaswitch/clearwater-etcd/pull/219"},"issue":{"href":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/219"},"comments":{"href":"https://api.github.com/repos/Metaswitch/clearwater-etcd/issues/219/comments"},"review_comments":{"href":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/219/comments"},"review_comment":{"href":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Metaswitch/clearwater-etcd/pulls/219/commits"},"statuses":{"href":"https://api.github.com/repos/Metaswitch/clearwater-etcd/statuses/42552848e9cf51553175cfdeff77072b9e933acb"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rkd-msw","id":4363492,"avatar_url":"https://avatars.githubusercontent.com/u/4363492?v=3","gravatar_id":"","url":"https://api.github.com/users/rkd-msw","html_url":"https://github.com/rkd-msw","followers_url":"https://api.github.com/users/rkd-msw/followers","following_url":"https://api.github.com/users/rkd-msw/following{/other_user}","gists_url":"https://api.github.com/users/rkd-msw/gists{/gist_id}","starred_url":"https://api.github.com/users/rkd-msw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkd-msw/subscriptions","organizations_url":"https://api.github.com/users/rkd-msw/orgs","repos_url":"https://api.github.com/users/rkd-msw/repos","events_url":"https://api.github.com/users/rkd-msw/events{/privacy}","received_events_url":"https://api.github.com/users/rkd-msw/received_events","type":"User","site_admin":false},"comments":4,"review_comments":4,"commits":7,"additions":51,"deletions":18,"changed_files":5}}