ve: don't call shutdown hook for now

Submitted by Stanislav Kinsburskiy on Oct. 2, 2017, 2:47 p.m.

Details

Message ID 20171002144714.15218.87119.stgit@localhost.localdomain
State New
Series "ve: don't call shutdown hook for now"
Headers show

Commit Message

Stanislav Kinsburskiy Oct. 2, 2017, 2:47 p.m.
This hook is needed only for releaseing venet IP address early (thus allowing
to restart container with the same IP faster).
But mount are destroyed asynchroniosly, and thus NFS mount can be destroyed
after IP address is dropped.
Let's fir this race it the way how all the world does things: release IP with
network namespace.

https://jira.sw.ru/browse/PSBM-73193

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 kernel/ve/ve.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index b0188c3..4efb9d9 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -451,7 +451,8 @@  static void ve_drop_context(struct ve_struct *ve)
 	synchronize_rcu();
 	put_nsproxy(ve_ns);
 
-	ve_hook_iterate_fini(VE_SHUTDOWN_CHAIN, ve);
+	/* This have to be revisited */
+//	ve_hook_iterate_fini(VE_SHUTDOWN_CHAIN, ve);
 
 	put_cred(ve->init_cred);
 	ve->init_cred = NULL;

Comments

Andrey Vagin Oct. 2, 2017, 6:05 p.m.
On Mon, Oct 02, 2017 at 06:47:19PM +0400, Stanislav Kinsburskiy wrote:
> This hook is needed only for releaseing venet IP address early (thus allowing
> to restart container with the same IP faster).
> But mount are destroyed asynchroniosly, and thus NFS mount can be destroyed
> after IP address is dropped.
> Let's fir this race it the way how all the world does things: release IP with
> network namespace.

Why don't you remove this code? Who added this hook? What was a reason?

> 
> https://jira.sw.ru/browse/PSBM-73193
> 
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
> ---
>  kernel/ve/ve.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
> index b0188c3..4efb9d9 100644
> --- a/kernel/ve/ve.c
> +++ b/kernel/ve/ve.c
> @@ -451,7 +451,8 @@ static void ve_drop_context(struct ve_struct *ve)
>  	synchronize_rcu();
>  	put_nsproxy(ve_ns);
>  
> -	ve_hook_iterate_fini(VE_SHUTDOWN_CHAIN, ve);
> +	/* This have to be revisited */
> +//	ve_hook_iterate_fini(VE_SHUTDOWN_CHAIN, ve);
>  
>  	put_cred(ve->init_cred);
>  	ve->init_cred = NULL;
> 
> _______________________________________________
> Devel mailing list
> Devel@openvz.org
> https://lists.openvz.org/mailman/listinfo/devel