From c1be25b78d89a3a55a32a7aa10724134eda9813d Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Fri, 18 Jan 2019 17:35:09 -0800 Subject: Scrub runsc error messages Removed "error" and "failed to" prefix that don't add value from messages. Adjusted a few other messages. In particular, when the container fail to start, the message returned is easier for humans to read: $ docker run --rm --runtime=runsc alpine foobar docker: Error response from daemon: OCI runtime start failed: did not terminate sucessfully: starting container: starting root container [foobar]: starting sandbox: searching for executable "foobar", cwd: "/", $PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin": no such file or directory Closes #77 PiperOrigin-RevId: 230022798 Change-Id: I83339017c70dae09e4f9f8e0ea2e554c4d5d5cd1 --- runsc/cmd/restore.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runsc/cmd/restore.go') diff --git a/runsc/cmd/restore.go b/runsc/cmd/restore.go index 64b302b0c..66b23c38e 100644 --- a/runsc/cmd/restore.go +++ b/runsc/cmd/restore.go @@ -84,7 +84,7 @@ func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...interface{ } spec, err := specutils.ReadSpec(bundleDir) if err != nil { - Fatalf("error reading spec: %v", err) + Fatalf("reading spec: %v", err) } specutils.LogSpec(spec) @@ -96,15 +96,15 @@ func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...interface{ c, err := container.Load(conf.RootDir, id) if err != nil { - Fatalf("error loading container: %v", err) + Fatalf("loading container: %v", err) } if err := c.Restore(spec, conf, restoreFile); err != nil { - Fatalf("error restoring container: %v", err) + Fatalf("restoring container: %v", err) } ws, err := c.Wait() if err != nil { - Fatalf("error running container: %v", err) + Fatalf("running container: %v", err) } *waitStatus = ws -- cgit v1.2.3