summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/cmd')
-rw-r--r--runsc/cmd/boot.go8
-rw-r--r--runsc/cmd/checkpoint.go14
-rw-r--r--runsc/cmd/create.go4
-rw-r--r--runsc/cmd/debug.go8
-rw-r--r--runsc/cmd/delete.go4
-rw-r--r--runsc/cmd/events.go6
-rw-r--r--runsc/cmd/exec.go24
-rw-r--r--runsc/cmd/gofer.go16
-rw-r--r--runsc/cmd/kill.go2
-rw-r--r--runsc/cmd/list.go4
-rw-r--r--runsc/cmd/path.go2
-rw-r--r--runsc/cmd/pause.go2
-rw-r--r--runsc/cmd/ps.go8
-rw-r--r--runsc/cmd/restore.go8
-rw-r--r--runsc/cmd/resume.go2
-rw-r--r--runsc/cmd/run.go4
-rw-r--r--runsc/cmd/spec.go2
-rw-r--r--runsc/cmd/start.go4
-rw-r--r--runsc/cmd/state.go4
-rw-r--r--runsc/cmd/wait.go12
20 files changed, 69 insertions, 69 deletions
diff --git a/runsc/cmd/boot.go b/runsc/cmd/boot.go
index fb1fd3e70..7f87b2623 100644
--- a/runsc/cmd/boot.go
+++ b/runsc/cmd/boot.go
@@ -154,7 +154,7 @@ func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
defer specFile.Close()
spec, err := specutils.ReadSpecFromFile(b.bundleDir, specFile)
if err != nil {
- Fatalf("error reading spec: %v", err)
+ Fatalf("reading spec: %v", err)
}
specutils.LogSpec(spec)
@@ -208,7 +208,7 @@ func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
}
l, err := boot.New(bootArgs)
if err != nil {
- Fatalf("error creating loader: %v", err)
+ Fatalf("creating loader: %v", err)
}
// Fatalf exits the process and doesn't run defers.
@@ -220,7 +220,7 @@ func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
buf := make([]byte, 1)
if w, err := startSyncFile.Write(buf); err != nil || w != 1 {
l.Destroy()
- Fatalf("Unable to write into the start-sync descriptor: %v", err)
+ Fatalf("unable to write into the start-sync descriptor: %v", err)
}
// Closes startSyncFile because 'l.Run()' only returns when the sandbox exits.
startSyncFile.Close()
@@ -231,7 +231,7 @@ func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
// Run the application and wait for it to finish.
if err := l.Run(); err != nil {
l.Destroy()
- Fatalf("error running sandbox: %v", err)
+ Fatalf("running sandbox: %v", err)
}
ws := l.WaitExit()
diff --git a/runsc/cmd/checkpoint.go b/runsc/cmd/checkpoint.go
index 4f4771da2..d8f748aa0 100644
--- a/runsc/cmd/checkpoint.go
+++ b/runsc/cmd/checkpoint.go
@@ -77,7 +77,7 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interfa
cont, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading container: %v", err)
+ Fatalf("loading container: %v", err)
}
if c.imagePath == "" {
@@ -85,7 +85,7 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interfa
}
if err := os.MkdirAll(c.imagePath, 0755); err != nil {
- Fatalf("error making directories at path provided: %v", err)
+ Fatalf("making directories at path provided: %v", err)
}
fullImagePath := filepath.Join(c.imagePath, checkpointFileName)
@@ -115,12 +115,12 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interfa
// Restore into new container with same ID.
bundleDir := cont.BundleDir
if bundleDir == "" {
- Fatalf("error setting bundleDir")
+ Fatalf("setting bundleDir")
}
spec, err := specutils.ReadSpec(bundleDir)
if err != nil {
- Fatalf("error reading spec: %v", err)
+ Fatalf("reading spec: %v", err)
}
specutils.LogSpec(spec)
@@ -130,17 +130,17 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interfa
}
if err := cont.Destroy(); err != nil {
- Fatalf("error destroying container: %v", err)
+ Fatalf("destroying container: %v", err)
}
cont, err = container.Create(id, spec, conf, bundleDir, "", "", "")
if err != nil {
- Fatalf("error restoring container: %v", err)
+ Fatalf("restoring container: %v", err)
}
defer cont.Destroy()
if err := cont.Restore(spec, conf, fullImagePath); err != nil {
- Fatalf("error starting container: %v", err)
+ Fatalf("starting container: %v", err)
}
ws, err := cont.Wait()
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
}
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)
}
diff --git a/runsc/cmd/delete.go b/runsc/cmd/delete.go
index 8c7c7a5cd..3206b267a 100644
--- a/runsc/cmd/delete.go
+++ b/runsc/cmd/delete.go
@@ -74,13 +74,13 @@ func (d *Delete) execute(ids []string, conf *boot.Config) error {
log.Warningf("couldn't find container %q: %v", id, err)
return nil
}
- return fmt.Errorf("error loading container %q: %v", id, err)
+ return fmt.Errorf("loading container %q: %v", id, err)
}
if !d.force && c.Status != container.Created && c.Status != container.Stopped {
return fmt.Errorf("cannot delete container that is not stopped without --force flag")
}
if err := c.Destroy(); err != nil {
- return fmt.Errorf("error destroying container: %v", err)
+ return fmt.Errorf("destroying container: %v", err)
}
}
return nil
diff --git a/runsc/cmd/events.go b/runsc/cmd/events.go
index a54856fb4..208d2f74b 100644
--- a/runsc/cmd/events.go
+++ b/runsc/cmd/events.go
@@ -76,7 +76,7 @@ func (evs *Events) Execute(ctx context.Context, f *flag.FlagSet, args ...interfa
c, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading sandbox: %v", err)
+ Fatalf("loading sandbox: %v", err)
}
// Repeatedly get stats from the container.
@@ -84,13 +84,13 @@ func (evs *Events) Execute(ctx context.Context, f *flag.FlagSet, args ...interfa
// Get the event and print it as JSON.
ev, err := c.Event()
if err != nil {
- log.Warningf("error getting events for container: %v", err)
+ log.Warningf("Error getting events for container: %v", err)
}
// err must be preserved because it is used below when breaking
// out of the loop.
b, err := json.Marshal(ev)
if err != nil {
- log.Warningf("error while marshalling event %v: %v", ev, err)
+ log.Warningf("Error while marshalling event %v: %v", ev, err)
} else {
os.Stdout.Write(b)
}
diff --git a/runsc/cmd/exec.go b/runsc/cmd/exec.go
index 548207222..13584d800 100644
--- a/runsc/cmd/exec.go
+++ b/runsc/cmd/exec.go
@@ -111,14 +111,14 @@ func (ex *Exec) SetFlags(f *flag.FlagSet) {
func (ex *Exec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus {
e, id, err := ex.parseArgs(f)
if err != nil {
- Fatalf("error parsing process spec: %v", err)
+ Fatalf("parsing process spec: %v", err)
}
conf := args[0].(*boot.Config)
waitStatus := args[1].(*syscall.WaitStatus)
c, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading sandbox: %v", err)
+ Fatalf("loading sandbox: %v", err)
}
// Replace empty settings with defaults from container.
@@ -128,13 +128,13 @@ func (ex *Exec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
if e.Envv == nil {
e.Envv, err = resolveEnvs(c.Spec.Process.Env, ex.env)
if err != nil {
- Fatalf("error getting environment variables: %v", err)
+ Fatalf("getting environment variables: %v", err)
}
}
if e.Capabilities == nil {
e.Capabilities, err = specutils.Capabilities(c.Spec.Process.Capabilities)
if err != nil {
- Fatalf("error creating capabilities: %v", err)
+ Fatalf("creating capabilities: %v", err)
}
}
@@ -149,7 +149,7 @@ func (ex *Exec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
// Start the new process and get it pid.
pid, err := c.Execute(e)
if err != nil {
- Fatalf("error getting processes for container: %v", err)
+ Fatalf("getting processes for container: %v", err)
}
if e.StdioIsPty {
@@ -163,7 +163,7 @@ func (ex *Exec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
if ex.internalPidFile != "" {
pidStr := []byte(strconv.Itoa(int(pid)))
if err := ioutil.WriteFile(ex.internalPidFile, pidStr, 0644); err != nil {
- Fatalf("error writing internal pid file %q: %v", ex.internalPidFile, err)
+ Fatalf("writing internal pid file %q: %v", ex.internalPidFile, err)
}
}
@@ -172,14 +172,14 @@ func (ex *Exec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
// returns.
if ex.pidFile != "" {
if err := ioutil.WriteFile(ex.pidFile, []byte(strconv.Itoa(os.Getpid())), 0644); err != nil {
- Fatalf("error writing pid file: %v", err)
+ Fatalf("writing pid file: %v", err)
}
}
// Wait for the process to exit.
ws, err := c.WaitPID(pid, ex.clearStatus)
if err != nil {
- Fatalf("error waiting on pid %d: %v", pid, err)
+ Fatalf("waiting on pid %d: %v", pid, err)
}
*waitStatus = ws
return subcommands.ExitSuccess
@@ -188,7 +188,7 @@ func (ex *Exec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
func (ex *Exec) execAndWait(waitStatus *syscall.WaitStatus) subcommands.ExitStatus {
binPath, err := specutils.BinPath()
if err != nil {
- Fatalf("error getting bin path: %v", err)
+ Fatalf("getting bin path: %v", err)
}
var args []string
@@ -199,7 +199,7 @@ func (ex *Exec) execAndWait(waitStatus *syscall.WaitStatus) subcommands.ExitStat
if pidFile == "" {
tmpDir, err := ioutil.TempDir("", "exec-pid-")
if err != nil {
- Fatalf("error creating TempDir: %v", err)
+ Fatalf("creating TempDir: %v", err)
}
defer os.RemoveAll(tmpDir)
pidFile = filepath.Join(tmpDir, "pid")
@@ -232,7 +232,7 @@ func (ex *Exec) execAndWait(waitStatus *syscall.WaitStatus) subcommands.ExitStat
// socket.
tty, err := console.NewWithSocket(ex.consoleSocket)
if err != nil {
- Fatalf("error setting up console with socket %q: %v", ex.consoleSocket, err)
+ Fatalf("setting up console with socket %q: %v", ex.consoleSocket, err)
}
defer tty.Close()
@@ -307,7 +307,7 @@ func (ex *Exec) argsFromCLI(argv []string) (*control.ExecArgs, error) {
for _, s := range ex.extraKGIDs {
kgid, err := strconv.Atoi(s)
if err != nil {
- Fatalf("error parsing GID: %s, %v", s, err)
+ Fatalf("parsing GID: %s, %v", s, err)
}
extraKGIDs = append(extraKGIDs, auth.KGID(kgid))
}
diff --git a/runsc/cmd/gofer.go b/runsc/cmd/gofer.go
index 7276f3f26..43286a2e5 100644
--- a/runsc/cmd/gofer.go
+++ b/runsc/cmd/gofer.go
@@ -101,12 +101,12 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
specFile, err := specutils.OpenCleanSpec(g.bundleDir)
if err != nil {
- Fatalf("error opening spec: %v", err)
+ Fatalf("opening spec: %v", err)
}
spec, err := specutils.ReadSpecFromFile(g.bundleDir, specFile)
specFile.Close()
if err != nil {
- Fatalf("error reading spec: %v", err)
+ Fatalf("reading spec: %v", err)
}
specutils.LogSpec(spec)
@@ -120,7 +120,7 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
Fatalf("failed to chroot to %q: %v", root, err)
}
if err := syscall.Chdir("/"); err != nil {
- Fatalf("failed to change working dir: %v", err)
+ Fatalf("changing working dir: %v", err)
}
log.Infof("Process chroot'd to %q", root)
@@ -131,7 +131,7 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
PanicOnWrite: g.panicOnWrite,
})
if err != nil {
- Fatalf("Error creating attach point: %v", err)
+ Fatalf("creating attach point: %v", err)
}
ats = append(ats, ap)
log.Infof("Serving %q mapped to %q on FD %d (ro: %t)", "/", root, g.ioFDs[0], spec.Root.Readonly)
@@ -145,12 +145,12 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
}
ap, err := fsgofer.NewAttachPoint(m.Destination, cfg)
if err != nil {
- Fatalf("Error creating attach point: %v", err)
+ Fatalf("creating attach point: %v", err)
}
ats = append(ats, ap)
if mountIdx >= len(g.ioFDs) {
- Fatalf("No FD found for mount. Did you forget --io-fd? mount: %d, %v", len(g.ioFDs), m)
+ Fatalf("no FD found for mount. Did you forget --io-fd? mount: %d, %v", len(g.ioFDs), m)
}
log.Infof("Serving %q mapped on FD %d (ro: %t)", m.Destination, g.ioFDs[mountIdx], cfg.ROMount)
mountIdx++
@@ -161,7 +161,7 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
}
if err := filter.Install(); err != nil {
- Fatalf("Failed to install seccomp filters: %v", err)
+ Fatalf("installing seccomp filters: %v", err)
}
runServers(ats, g.ioFDs)
@@ -176,7 +176,7 @@ func runServers(ats []p9.Attacher, ioFDs []int) {
go func(ioFD int, at p9.Attacher) {
socket, err := unet.NewSocket(ioFD)
if err != nil {
- Fatalf("err creating server on FD %d: %v", ioFD, err)
+ Fatalf("creating server on FD %d: %v", ioFD, err)
}
s := p9.NewServer(at)
if err := s.Handle(socket); err != nil {
diff --git a/runsc/cmd/kill.go b/runsc/cmd/kill.go
index 7d86bb043..e67f82473 100644
--- a/runsc/cmd/kill.go
+++ b/runsc/cmd/kill.go
@@ -71,7 +71,7 @@ func (k *Kill) 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)
}
// The OCI command-line spec says that the signal should be specified
diff --git a/runsc/cmd/list.go b/runsc/cmd/list.go
index acefcb2db..481066225 100644
--- a/runsc/cmd/list.go
+++ b/runsc/cmd/list.go
@@ -81,7 +81,7 @@ func (l *List) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
for _, id := range ids {
c, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading container %q: %v", id, err)
+ Fatalf("loading container %q: %v", id, err)
}
containers = append(containers, c)
}
@@ -108,7 +108,7 @@ func (l *List) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
states = append(states, c.State())
}
if err := json.NewEncoder(os.Stdout).Encode(states); err != nil {
- Fatalf("error marshaling container state: %v", err)
+ Fatalf("marshaling container state: %v", err)
}
default:
Fatalf("unknown list format %q", l.format)
diff --git a/runsc/cmd/path.go b/runsc/cmd/path.go
index baba937a8..1276f0dbd 100644
--- a/runsc/cmd/path.go
+++ b/runsc/cmd/path.go
@@ -22,7 +22,7 @@ import (
func getwdOrDie() string {
wd, err := os.Getwd()
if err != nil {
- Fatalf("error getting current working directory: %v", err)
+ Fatalf("getting current working directory: %v", err)
}
return wd
}
diff --git a/runsc/cmd/pause.go b/runsc/cmd/pause.go
index ee608faba..2c93e5f3e 100644
--- a/runsc/cmd/pause.go
+++ b/runsc/cmd/pause.go
@@ -57,7 +57,7 @@ func (*Pause) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s
cont, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading container: %v", err)
+ Fatalf("loading container: %v", err)
}
if err := cont.Pause(); err != nil {
diff --git a/runsc/cmd/ps.go b/runsc/cmd/ps.go
index fd76cf975..060d796f2 100644
--- a/runsc/cmd/ps.go
+++ b/runsc/cmd/ps.go
@@ -62,11 +62,11 @@ func (ps *PS) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{})
c, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading sandbox: %v", err)
+ Fatalf("loading sandbox: %v", err)
}
pList, err := c.Processes()
if err != nil {
- Fatalf("error getting processes for container: %v", err)
+ Fatalf("getting processes for container: %v", err)
}
switch ps.format {
@@ -75,11 +75,11 @@ func (ps *PS) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{})
case "json":
o, err := control.PrintPIDsJSON(pList)
if err != nil {
- Fatalf("error generating JSON: %v", err)
+ Fatalf("generating JSON: %v", err)
}
fmt.Println(o)
default:
- Fatalf("Unsupported format: %s", ps.format)
+ Fatalf("unsupported format: %s", ps.format)
}
return subcommands.ExitSuccess
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
diff --git a/runsc/cmd/resume.go b/runsc/cmd/resume.go
index e684aeb5c..5551d1450 100644
--- a/runsc/cmd/resume.go
+++ b/runsc/cmd/resume.go
@@ -58,7 +58,7 @@ func (r *Resume) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}
cont, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading container: %v", err)
+ Fatalf("loading container: %v", err)
}
if err := cont.Resume(); err != nil {
diff --git a/runsc/cmd/run.go b/runsc/cmd/run.go
index 9a574679f..be1c1b678 100644
--- a/runsc/cmd/run.go
+++ b/runsc/cmd/run.go
@@ -69,13 +69,13 @@ func (r *Run) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s
}
spec, err := specutils.ReadSpec(bundleDir)
if err != nil {
- Fatalf("error reading spec: %v", err)
+ Fatalf("reading spec: %v", err)
}
specutils.LogSpec(spec)
ws, err := container.Run(id, spec, conf, bundleDir, r.consoleSocket, r.pidFile, r.userLog)
if err != nil {
- Fatalf("error running container: %v", err)
+ Fatalf("running container: %v", err)
}
*waitStatus = ws
diff --git a/runsc/cmd/spec.go b/runsc/cmd/spec.go
index ee306bfa6..063bd39c5 100644
--- a/runsc/cmd/spec.go
+++ b/runsc/cmd/spec.go
@@ -175,7 +175,7 @@ func (s *Spec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
}
if err := ioutil.WriteFile(confPath, specTemplate, 0664); err != nil {
- Fatalf("error writing to %q: %v", confPath, err)
+ Fatalf("writing to %q: %v", confPath, err)
}
return subcommands.ExitSuccess
diff --git a/runsc/cmd/start.go b/runsc/cmd/start.go
index 065efec06..9e2e0c11d 100644
--- a/runsc/cmd/start.go
+++ b/runsc/cmd/start.go
@@ -56,10 +56,10 @@ func (*Start) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s
c, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading container: %v", err)
+ Fatalf("loading container: %v", err)
}
if err := c.Start(conf); err != nil {
- Fatalf("error starting container: %v", err)
+ Fatalf("starting container: %v", err)
}
return subcommands.ExitSuccess
}
diff --git a/runsc/cmd/state.go b/runsc/cmd/state.go
index 15e27b250..c3ef65ab5 100644
--- a/runsc/cmd/state.go
+++ b/runsc/cmd/state.go
@@ -59,7 +59,7 @@ func (*State) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s
c, err := container.Load(conf.RootDir, id)
if err != nil {
- Fatalf("error loading container: %v", err)
+ Fatalf("loading container: %v", err)
}
log.Debugf("Returning state for container %+v", c)
@@ -69,7 +69,7 @@ func (*State) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s
// Write json-encoded state directly to stdout.
b, err := json.MarshalIndent(state, "", " ")
if err != nil {
- Fatalf("error marshaling container state: %v", err)
+ Fatalf("marshaling container state: %v", err)
}
os.Stdout.Write(b)
return subcommands.ExitSuccess
diff --git a/runsc/cmd/wait.go b/runsc/cmd/wait.go
index 1e1c1fe17..6498dd15c 100644
--- a/runsc/cmd/wait.go
+++ b/runsc/cmd/wait.go
@@ -66,7 +66,7 @@ func (wt *Wait) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
}
// You can't specify both -pid and -rootpid.
if wt.rootPID != unsetPID && wt.pid != unsetPID {
- Fatalf("only up to one of -pid and -rootPid can be set")
+ Fatalf("only one of -pid and -rootPid can be set")
}
id := f.Arg(0)
@@ -74,7 +74,7 @@ func (wt *Wait) 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)
}
var waitStatus syscall.WaitStatus
@@ -83,21 +83,21 @@ func (wt *Wait) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
case wt.rootPID == unsetPID && wt.pid == unsetPID:
ws, err := c.Wait()
if err != nil {
- Fatalf("error waiting on container %q: %v", c.ID, err)
+ Fatalf("waiting on container %q: %v", c.ID, err)
}
waitStatus = ws
// Wait on a PID in the root PID namespace.
case wt.rootPID != unsetPID:
ws, err := c.WaitRootPID(int32(wt.rootPID), true /* clearStatus */)
if err != nil {
- Fatalf("error waiting on PID in root PID namespace %d in container %q: %v", wt.rootPID, c.ID, err)
+ Fatalf("waiting on PID in root PID namespace %d in container %q: %v", wt.rootPID, c.ID, err)
}
waitStatus = ws
// Wait on a PID in the container's PID namespace.
case wt.pid != unsetPID:
ws, err := c.WaitPID(int32(wt.pid), true /* clearStatus */)
if err != nil {
- Fatalf("error waiting on PID %d in container %q: %v", wt.pid, c.ID, err)
+ Fatalf("waiting on PID %d in container %q: %v", wt.pid, c.ID, err)
}
waitStatus = ws
}
@@ -107,7 +107,7 @@ func (wt *Wait) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
}
// Write json-encoded wait result directly to stdout.
if err := json.NewEncoder(os.Stdout).Encode(result); err != nil {
- Fatalf("error marshaling wait result: %v", err)
+ Fatalf("marshaling wait result: %v", err)
}
return subcommands.ExitSuccess
}