From 07646a71509d33a32db64daa0793d649d631fab8 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Sun, 17 Apr 2016 12:01:19 -0700 Subject: [PATCH] Return runtime output on checkpoint operation errors Signed-off-by: Kenfe-Mickael Laventure --- runtime/container_linux.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/container_linux.go b/runtime/container_linux.go index 25fd9a4..5bb9acb 100644 --- a/runtime/container_linux.go +++ b/runtime/container_linux.go @@ -133,7 +133,11 @@ func (c *container) Checkpoint(cpt Checkpoint) error { add("--ext-unix-sk") } add(c.id) - return exec.Command(c.runtime, args...).Run() + out, err := exec.Command(c.runtime, args...).CombinedOutput() + if err != nil { + return fmt.Errorf("%s: %s", err.Error(), string(out)) + } + return err } func (c *container) DeleteCheckpoint(name string) error {