{"action":"created","issue":{"url":"https://api.github.com/repos/opencontainers/specs/issues/20","labels_url":"https://api.github.com/repos/opencontainers/specs/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/opencontainers/specs/issues/20/comments","events_url":"https://api.github.com/repos/opencontainers/specs/issues/20/events","html_url":"https://github.com/opencontainers/specs/issues/20","id":91033280,"number":20,"title":"Support Lifecycle Hooks","user":{"login":"vishh","id":7063592,"avatar_url":"https://avatars.githubusercontent.com/u/7063592?v=3","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/opencontainers/specs/labels/features/lifecycle","name":"features/lifecycle","color":"ffffff"}],"state":"open","locked":false,"assignee":{"login":"mrunalp","id":53798,"avatar_url":"https://avatars.githubusercontent.com/u/53798?v=3","gravatar_id":"","url":"https://api.github.com/users/mrunalp","html_url":"https://github.com/mrunalp","followers_url":"https://api.github.com/users/mrunalp/followers","following_url":"https://api.github.com/users/mrunalp/following{/other_user}","gists_url":"https://api.github.com/users/mrunalp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrunalp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrunalp/subscriptions","organizations_url":"https://api.github.com/users/mrunalp/orgs","repos_url":"https://api.github.com/users/mrunalp/repos","events_url":"https://api.github.com/users/mrunalp/events{/privacy}","received_events_url":"https://api.github.com/users/mrunalp/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/opencontainers/specs/milestones/2","html_url":"https://github.com/opencontainers/specs/milestones/by-1.0.0","labels_url":"https://api.github.com/repos/opencontainers/specs/milestones/2/labels","id":1188102,"number":2,"title":"by-1.0.0","description":"Anything that we expect to be included in the 1.0.0 release.","creator":{"login":"philips","id":33544,"avatar_url":"https://avatars.githubusercontent.com/u/33544?v=3","gravatar_id":"","url":"https://api.github.com/users/philips","html_url":"https://github.com/philips","followers_url":"https://api.github.com/users/philips/followers","following_url":"https://api.github.com/users/philips/following{/other_user}","gists_url":"https://api.github.com/users/philips/gists{/gist_id}","starred_url":"https://api.github.com/users/philips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philips/subscriptions","organizations_url":"https://api.github.com/users/philips/orgs","repos_url":"https://api.github.com/users/philips/repos","events_url":"https://api.github.com/users/philips/events{/privacy}","received_events_url":"https://api.github.com/users/philips/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":5,"state":"open","created_at":"2015-06-30T23:10:23Z","updated_at":"2016-01-13T22:35:38Z","due_on":"2016-06-01T04:00:00Z","closed_at":null},"comments":36,"created_at":"2015-06-25T17:56:13Z","updated_at":"2016-01-18T04:45:50Z","closed_at":null,"body":"Capturing requirements for Lifecycle hooks discussed during the summit.\r\n\r\nLifecycle hooks was agreed to be a useful feature and support for a few basic hooks is expected to be in place. Specifically, PreStart, PreStop and PostStop hooks will be introduced to start with. Supporting hooks might require separating the lifetime of namespaces from that of the processes in the container. \r\n\r\nHooks will be binaries that will be exec'ed. The Spec and current State of the container will be provided as arguments to the hook (via fds?). Are the exec hooks executed synchronously? \r\n\r\nThis issue is meant to define the Spec for Hooks and discuss the hooks that are necessary to begin with."},"comment":{"url":"https://api.github.com/repos/opencontainers/specs/issues/comments/172424749","html_url":"https://github.com/opencontainers/specs/issues/20#issuecomment-172424749","issue_url":"https://api.github.com/repos/opencontainers/specs/issues/20","id":172424749,"user":{"login":"wking","id":209920,"avatar_url":"https://avatars.githubusercontent.com/u/209920?v=3","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T04:45:49Z","updated_at":"2016-01-18T04:45:49Z","body":"On Sun, Jan 17, 2016 at 06:07:08AM -0800, Daniel J Walsh wrote:\n> I really need post-mount.  I want a hook that is going to mount\n> additional mount points to /sys.  Currently if I use prestart, /sys\n> gets mounted over my mount points.\n\nI think “more hooks” is the wrong solution.  If you've provided /sys,\nI don't think the runtime should be clobbering it (see points two and\nthree here [1]).  Of course, those points aren't currently spelled out\nin the spec, which is pretty vague about the timing and clobbering\ndetails of runtime-provided devices and mount points.\n\nAnd I'd have expected pre-start to be run after the mount setup anyway\n(it happens later in ccon [2]).\n\nBut regardless of how this should be handled now, separate create/exec\nactions (#299) should get you out of this problem, because /sys-level\nmount tweaking should not be happening in the exec phase.  That lets\nyou fix any broken start-phase functionality before calling exec.  And\nthe only mount-tweaking done by exec will probably be mounting a new\n/proc if the exec creates a new PID namespace [3].  And the only thing\n*that* will clobber (on my system anyway) is [4].\n\n[1]: https://github.com/opencontainers/specs/pull/164#issuecomment-138984824\n[2]: https://github.com/wking/ccon/tree/v0.3.0#lifecycle\n[3]: http://man7.org/linux/man-pages/man7/pid_namespaces.7.html\n     See “/proc and PID namespaces”\n[4]: https://www.kernel.org/doc/Documentation/binfmt_misc.txt\n"}}