]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
commands: don't fail if unfreeze fails 3539/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 17 Sep 2020 09:11:44 +0000 (11:11 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 17 Sep 2020 13:51:41 +0000 (15:51 +0200)
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 <christian.brauner@ubuntu.com>
src/lxc/commands.c

index 4ed84c3a02be6067021fa67600612398e98eb860..de09c3aff0b856ef847e140fa0245ffdd3df674b 100644 (file)
@@ -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;
        }