summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/debug.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-01-18 17:35:09 -0800
committerShentubot <shentubot@google.com>2019-01-18 17:36:02 -0800
commitc1be25b78d89a3a55a32a7aa10724134eda9813d (patch)
treebb5c09cb94ab212c158041b260ed0bb480e2a9d5 /runsc/cmd/debug.go
parentc0a981629cf44688687548490c5e665d851afe06 (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/debug.go')
-rw-r--r--runsc/cmd/debug.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/runsc/cmd/debug.go b/runsc/cmd/debug.go
index de530c068..e10326754 100644
--- a/runsc/cmd/debug.go
+++ b/runsc/cmd/debug.go
@@ -68,7 +68,7 @@ func (d *Debug) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
var err error
c, err = container.Load(conf.RootDir, f.Arg(0))
if err != nil {
- Fatalf("error loading container %q: %v", f.Arg(0), err)
+ Fatalf("loading container %q: %v", f.Arg(0), err)
}
} else {
if f.NArg() != 0 {
@@ -78,12 +78,12 @@ func (d *Debug) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
// Go over all sandboxes and find the one that matches PID.
ids, err := container.List(conf.RootDir)
if err != nil {
- Fatalf("error listing containers: %v", err)
+ Fatalf("listing containers: %v", err)
}
for _, id := range ids {
candidate, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading container %q: %v", id, err)
+ Fatalf("loading container %q: %v", id, err)
}
if candidate.SandboxPid() == d.pid {
c = candidate
@@ -110,7 +110,7 @@ func (d *Debug) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
log.Infof("Retrieving sandbox stacks")
stacks, err := c.Sandbox.Stacks()
if err != nil {
- Fatalf("error retrieving stacks: %v", err)
+ Fatalf("retrieving stacks: %v", err)
}
log.Infof(" *** Stack dump ***\n%s", stacks)
}