-
Notifications
You must be signed in to change notification settings - Fork 596
Allow to call Pre-start hooks for join-ns-spec #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hooks are not only available for creating new ns case, but also for joining existing ns case. Signed-off-by: Gao feng <[email protected]>
|
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? |
|
@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. |
|
@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, |
|
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. |
|
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 |
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). |
As #158 said
I think this means creating device node for the existing namespace through the config is incorrect. |
|
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 |
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. |
|
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, |
|
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 |
|
-1 Lets keep the wording as is because the new wording add more confusion than clarification. |
|
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.
|
|
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 [email protected]