diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-01-18 17:35:09 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-01-18 17:36:02 -0800 |
commit | c1be25b78d89a3a55a32a7aa10724134eda9813d (patch) | |
tree | bb5c09cb94ab212c158041b260ed0bb480e2a9d5 /runsc/cmd/create.go | |
parent | c0a981629cf44688687548490c5e665d851afe06 (diff) |
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: <path> 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
Diffstat (limited to 'runsc/cmd/create.go')
-rw-r--r-- | runsc/cmd/create.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runsc/cmd/create.go b/runsc/cmd/create.go index d187b8592..30c8fa283 100644 --- a/runsc/cmd/create.go +++ b/runsc/cmd/create.go @@ -89,7 +89,7 @@ func (c *Create) 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) @@ -97,7 +97,7 @@ func (c *Create) Execute(_ context.Context, f *flag.FlagSet, args ...interface{} // container unless the metadata specifies that it should be run in an // existing container. if _, err := container.Create(id, spec, conf, bundleDir, c.consoleSocket, c.pidFile, c.userLog); err != nil { - Fatalf("error creating container: %v", err) + Fatalf("creating container: %v", err) } return subcommands.ExitSuccess } |