From: Christian Brauner Date: Thu, 17 Sep 2020 09:11:44 +0000 (+0200) Subject: commands: don't fail if unfreeze fails X-Git-Tag: lxc-5.0.0~359^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8db8adea44b0be8736a42cafbc8b4fb048e2a655;p=thirdparty%2Flxc.git commands: don't fail if unfreeze fails We can e.g. fail the unfreeze because the freezer cgroup is not available and then we erronously report that stopping the container failed. Closes: #3471. Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 4ed84c3a0..de09c3aff 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -894,12 +894,11 @@ static int lxc_cmd_stop_callback(int fd, struct lxc_cmd_req *req, else TRACE("Sent signal %d to pidfd %d", stopsignal, handler->pid); - rsp.ret = cgroup_ops->unfreeze(cgroup_ops, -1); - if (!rsp.ret) - return 0; + ret = cgroup_ops->unfreeze(cgroup_ops, -1); + if (ret) + WARN("Failed to unfreeze container \"%s\"", handler->name); - ERROR("Failed to unfreeze container \"%s\"", handler->name); - rsp.ret = -errno; + return 0; } else { rsp.ret = -errno; }