]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
c/r: add more logging when restore fails
authorTycho Andersen <tycho.andersen@canonical.com>
Tue, 8 Dec 2015 23:08:11 +0000 (16:08 -0700)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 10 Dec 2015 04:00:26 +0000 (23:00 -0500)
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/criu.c

index 6f48493aea85e286e67e1271a74bc9618adec4a8..5ca4f9ff7a0b0ff6a7915889165db4b4342380f3 100644 (file)
@@ -525,6 +525,7 @@ void do_restore(struct lxc_container *c, int pipe, char *directory, bool verbose
 
                if (WIFEXITED(status)) {
                        if (WEXITSTATUS(status)) {
+                               ERROR("criu process exited %d\n", WEXITSTATUS(status));
                                goto out_fini_handler;
                        } else {
                                int ret;
@@ -544,8 +545,10 @@ void do_restore(struct lxc_container *c, int pipe, char *directory, bool verbose
                                        goto out_fini_handler;
                                }
 
-                               if (lxc_set_state(c->name, handler, RUNNING))
+                               if (lxc_set_state(c->name, handler, RUNNING)) {
+                                       ERROR("error setting running state after restore");
                                        goto out_fini_handler;
+                               }
                        }
                } else {
                        ERROR("CRIU was killed with signal %d\n", WTERMSIG(status));