Return runtime output on checkpoint operation errors

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-04-17 12:01:19 -07:00
parent 21364997bb
commit 07646a7150

View file

@ -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 {