{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/rkt/issues/885","labels_url":"https://api.github.com/repos/coreos/rkt/issues/885/labels{/name}","comments_url":"https://api.github.com/repos/coreos/rkt/issues/885/comments","events_url":"https://api.github.com/repos/coreos/rkt/issues/885/events","html_url":"https://github.com/coreos/rkt/pull/885","id":75256887,"number":885,"title":"stage1: systemd: remove patches --pid-file --keep-fd","user":{"login":"alban","id":27575,"avatar_url":"https://avatars.githubusercontent.com/u/27575?v=3","gravatar_id":"","url":"https://api.github.com/users/alban","html_url":"https://github.com/alban","followers_url":"https://api.github.com/users/alban/followers","following_url":"https://api.github.com/users/alban/following{/other_user}","gists_url":"https://api.github.com/users/alban/gists{/gist_id}","starred_url":"https://api.github.com/users/alban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alban/subscriptions","organizations_url":"https://api.github.com/users/alban/orgs","repos_url":"https://api.github.com/users/alban/repos","events_url":"https://api.github.com/users/alban/events{/privacy}","received_events_url":"https://api.github.com/users/alban/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coreos/rkt/labels/stage1","name":"stage1","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-11T15:20:34Z","updated_at":"2015-05-11T21:07:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/coreos/rkt/pulls/885","html_url":"https://github.com/coreos/rkt/pull/885","diff_url":"https://github.com/coreos/rkt/pull/885.diff","patch_url":"https://github.com/coreos/rkt/pull/885.patch"},"body":":warning: I am waiting feedback on the systemd mailing list before considering this PR.\r\n\r\n## stage1: introduce pid-file-writer to avoid \"--pid-file\"\r\n\r\nThe --pid-file patch was not accepted in systemd upstream. Instead, since systemd v219 (commit 733d15), nspawn sends the pid of the leader process through sd_notify. This patch introduces the helper process pid-file-writer to write the pid file received through sd_notify.\r\n\r\nThe aforementioned commit 733d15 is not in systemd-nspawn v215. Instead of porting it to v215, I am removing support for v215 built from sources.\r\n\r\nThis revealed a problem on how nspawn handle SIGCHLD signals.  pid-file-writer is a short-lived process and terminates when it successfully writes the pid file. When it terminates, its parent process will receive a SIGCHLD signal. Since its parent is systemd-nspawn, systemd-nspawn must handle SIGCHLD correctly. I sent a fix upstream: http://lists.freedesktop.org/archives/systemd-devel/2015-May/031589.html Until this gets merged upstream, I added the fix in stage1/rootfs/usr_from_src/patches/{master,v219}.\r\n\r\n## stage1: remove --keep-fd\r\n\r\nsystemd-nspawn should just keep the fd with this patch: http://lists.freedesktop.org/archives/systemd-devel/2015-May/031608.html\r\n\r\nUntil this gets merged upstream, I added the fix in stage1/rootfs/usr_from_src/patches/{master,v219}.\r\n"},"comment":{"url":"https://api.github.com/repos/coreos/rkt/issues/comments/101047283","html_url":"https://github.com/coreos/rkt/pull/885#issuecomment-101047283","issue_url":"https://api.github.com/repos/coreos/rkt/issues/885","id":101047283,"user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T21:07:42Z","updated_at":"2015-05-11T21:07:42Z","body":"Yeah, I am finding it hard to reationalise this over just carrying the keep-pid-file patch :-/"}}