[prev in list] [next in list] [prev in thread] [next in thread]
List: openvz-devel
Subject: Re: [Devel] [PATCH libvzctl] Suppress SUNRPC traffic on "fast stop".
From: Stanislav Kinsburskiy <skinsbursky () virtuozzo ! com>
Date: 2017-06-26 14:00:10
Message-ID: e7d38eca-cfbe-0652-9c4c-9e37236a9875 () virtuozzo ! com
[Download RAW message or body]
Please, drop this patch.
I'll sent next version.
23.06.2017 15:42, Stanislav Kinsburskiy пишет:
> This is needed to break infinite loop in SUNRPC state machine, leading to
> unstoppable container in case of unreachable network.
>
> https://jira.sw.ru/browse/PSBM-67544
>
> Note: needs kernel rh7-3.10.0-514.16.1.vz7.32.12 or newer
>
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
> ---
> lib/env_nsops.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/lib/env_nsops.c b/lib/env_nsops.c
> index d62dff4..e46a1e6 100644
> --- a/lib/env_nsops.c
> +++ b/lib/env_nsops.c
> @@ -1071,23 +1071,33 @@ static int ns_env_stop_force(struct vzctl_env_handle *h)
> {
> int ret, rc;
>
> + ret = cg_set_param(EID(h), CG_VE, "ve.sunrpc_abort", "1");
> + if (ret)
> + return ret;
> +
> logger(0, 0, "Forcibly stop the Container...");
>
> ret = cg_freezer_cmd(EID(h), VZCTL_CMD_FREEZE);
> if (ret)
> - return ret;
> + goto release_sunrpc;
>
> rc = ns_env_kill(h);
>
> /* Unfreeze unconditionally */
> ret = cg_freezer_cmd(EID(h), VZCTL_CMD_RESUME);
> - if (ret || rc)
> - return ret ?: rc;
> + if (ret || rc) {
> + ret = ret ?: rc;
> + goto release_sunrpc;
> + }
>
> if (wait_env_state(h, VZCTL_ENV_STOPPED, MAX_SHTD_TM))
> return vzctl_err(-1, 0, "Failed to stop Container:"
> " operation timed out");
> return 0;
> +
> +release_sunrpc:
> + (void) cg_set_param(EID(h), CG_VE, "ve.sunrpc_abort", "0");
> + return ret;
> }
>
> static int ns_env_cleanup(struct vzctl_env_handle *h, int flags)
>
> _______________________________________________
> Devel mailing list
> Devel@openvz.org
> https://lists.openvz.org/mailman/listinfo/devel
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic