Uh oh!
There was an error while loading. Please reload this page.
Allow to call Pre-start hooks for join-ns-spec - #161
Conversation
Hooks are not only available for creating new ns case, but also for joining existing ns case. Signed-off-by: Gao feng <omarapazanadi@gmail.com>
philips
commented
Sep 9, 2015
hrm, I don't follow what you are trying to say with this. I think you are trying to say that it happens after the namespace is created for the application or has been joined by the application? |
mrunalp
commented
Sep 9, 2015
@gao-feng I think if we are to support this in any form then they would have to be per namespace and separate from the existing pre-start hooks. |
gao-feng
commented
Sep 10, 2015
@philips No, before join the ns. @mrunalp Don't quite understand why hook should per namespace in join ns case. If there are something wrong, please let me know, |
dqminh
commented
Sep 10, 2015
I think the order is wrong here Runtime should join namespaces first before create new ones. Because if user decided to join an existing user namespace for example, then namespaces should be created after joining userns. I think it would be nice to list some use case for hooks when joining existing namespaces so we can figure out how hooks and create/join some namespaces can interact with each other. |
wking
commented
Sep 10, 2015
On Thu, Sep 10, 2015 at 10:44:27AM -0700, Daniel, Dao Quang Minh wrote:
Why is that? I don't see why you'd need to be in a userns to create a |
gao-feng
commented
Sep 11, 2015
Ok, join first, then create new ones. But this doesn't affect the topic we discussed.
Allowing to call hooks for joining existing ns case gives user a chance to tweak the host and namespace environment. such as change mount info of existing mnt ns, create special device node for the container process(hook is the only way to archive this now). |
wking
commented
Sep 11, 2015
gao-feng
commented
Sep 11, 2015
As #158 said
I think this means creating device node for the existing namespace through the config is incorrect. |
wking
commented
Sep 11, 2015
On Fri, Sep 11, 2015 at 07:42:44AM -0700, Gao feng wrote:
What's the namespace for device nodes? Maybe that counts as the mount Regardless of how we decide to handle config-side mknod, this |
dqminh
commented
Sep 11, 2015
Yes, the order doesnt affect the feature if i understand it correctly. But because you said hook should be run before joining the namespaces so that's abit weird. Think for prestart hook in the case of container that wants to join some existing namespaces, the general behavior is essentially the same as one that creates all namespaces i.e we join existing namespaces, then create new ones, then run prestart hooks, then run the application. I cant think of any cases where running it before each namespaces was joined is useful. The hook needs to be aware of the current state of container's namespaces though as @gao-feng said. |
wking
commented
Sep 11, 2015
On Fri, Sep 11, 2015 at 09:51:06AM -0700, Daniel, Dao Quang Minh wrote:
For example, you can't bind mount a host-side filesystem into the
The state JSON passed to the hooks contain's the application's PID, |
gao-feng
commented
Sep 14, 2015
wking
commented
Sep 14, 2015
On Mon, Sep 14, 2015 at 06:59:31AM -0700, Gao feng wrote: bff6d8a looks unambiguously useful to me, saying “it doesn't matter if |
crosbymichael
commented
Sep 25, 2015
-1 Lets keep the wording as is because the new wording add more confusion than clarification. |
conqerAtapple
commented
Sep 25, 2015
Looking at container lifecycle/state, would it make sense to add finer hooks with details of the namespace in which the hook executes? Currently its ambiguous.
|
wking
commented
Sep 25, 2015
On Fri, Sep 25, 2015 at 02:25:40PM -0700, Jojy George Varghese wrote:
I've floated a lifecycle that does this on the list [1](and it |
Hooks are not only available for creating new ns case, but also
for joining existing ns case.
Signed-off-by: Gao feng omarapazanadi@gmail.com