{"action":"created","issue":{"url":"https://api.github.com/repos/Metaswitch/crest/issues/260","labels_url":"https://api.github.com/repos/Metaswitch/crest/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/Metaswitch/crest/issues/260/comments","events_url":"https://api.github.com/repos/Metaswitch/crest/issues/260/events","html_url":"https://github.com/Metaswitch/crest/pull/260","id":115331436,"number":260,"title":"Use process name to identify homer and homestead-prov","user":{"login":"mbt-msw","id":13034686,"avatar_url":"https://avatars.githubusercontent.com/u/13034686?v=3","gravatar_id":"","url":"https://api.github.com/users/mbt-msw","html_url":"https://github.com/mbt-msw","followers_url":"https://api.github.com/users/mbt-msw/followers","following_url":"https://api.github.com/users/mbt-msw/following{/other_user}","gists_url":"https://api.github.com/users/mbt-msw/gists{/gist_id}","starred_url":"https://api.github.com/users/mbt-msw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbt-msw/subscriptions","organizations_url":"https://api.github.com/users/mbt-msw/orgs","repos_url":"https://api.github.com/users/mbt-msw/repos","events_url":"https://api.github.com/users/mbt-msw/events{/privacy}","received_events_url":"https://api.github.com/users/mbt-msw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"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,"comments":2,"created_at":"2015-11-05T17:17:14Z","updated_at":"2015-11-05T17:59:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Metaswitch/crest/pulls/260","html_url":"https://github.com/Metaswitch/crest/pull/260","diff_url":"https://github.com/Metaswitch/crest/pull/260.diff","patch_url":"https://github.com/Metaswitch/crest/pull/260.patch"},"body":"Homer and homestead-prov's init.d script uses only the executable name to identify homer and homestead-prov functions.  This causes problems if another script (e.g. a bulk import) is being run using the homer or homestead-prov python interpreter at the same time as the daemon is started or stopped.  For starting, start-stop-daemon will refuse to start it, and for stopping it will kill the bulk import script.\r\n\r\nThe fix is to use the process name to identify the daemon processes, which we can set using the `prctl` system call.\r\n\r\nThis also has the advantage that the daemons appear as `homer` and `homestead-prov` in process management tools like `top`."},"comment":{"url":"https://api.github.com/repos/Metaswitch/crest/issues/comments/154138426","html_url":"https://github.com/Metaswitch/crest/pull/260#issuecomment-154138426","issue_url":"https://api.github.com/repos/Metaswitch/crest/issues/260","id":154138426,"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},"created_at":"2015-11-05T17:59:03Z","updated_at":"2015-11-05T17:59:03Z","body":"One comment from me, otherwise +1. We should probably do this in our other Python repos too (and use pidfiles, which they use, in Crest)."}}