[Devel] [PATCH] ve: fix container stopped state check

Konstantin Khorenko khorenko at virtuozzo.com
Thu Dec 7 15:07:38 MSK 2017


Please consider this to ReadyKernel.

https://readykernel.com/

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 12/01/2017 02:22 PM, Stanislav Kinsburskiy wrote:
> Checking for empty cgroup is not correct, because init process leaves cgroup
> early in do_exit.
> This leads to a situation, when container is treated as stopped but its
> resources (VEIP for instance) are not yet released.
> Which in turn leads to container restart failure due to non-releases VEIP
> address.
>
> https://jira.sw.ru/browse/PSBM-78078
>
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
> ---
>  kernel/ve/ve.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
> index b0188c3..c628516 100644
> --- a/kernel/ve/ve.c
> +++ b/kernel/ve/ve.c
> @@ -846,7 +846,7 @@ static int ve_state_read(struct cgroup *cg, struct cftype *cft,
>
>  	if (ve->is_running)
>  		seq_puts(m, "RUNNING");
> -	else if (!nr_threads_ve(ve))
> +	else if (!ve->init_task)
>  		seq_puts(m, "STOPPED");
>  	else if (ve->ve_ns)
>  		seq_puts(m, "STOPPING");
>
> _______________________________________________
> Devel mailing list
> Devel at openvz.org
> https://lists.openvz.org/mailman/listinfo/devel
> .
>


More information about the Devel mailing list