diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-17 15:31:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 15:31:51 +0200 |
commit | 29be1764b419da68eb5f5ee1504631448ea495c4 (patch) | |
tree | db3bd7c0a369c9c233573c2ab353b9a5196b506d /libpod | |
parent | 670fc030886938b4ee93aa2ddd5db6c947bd975a (diff) | |
parent | 04858a218f3971d2f4574d5b469b7f52c15d2592 (diff) | |
download | podman-29be1764b419da68eb5f5ee1504631448ea495c4.tar.gz podman-29be1764b419da68eb5f5ee1504631448ea495c4.tar.bz2 podman-29be1764b419da68eb5f5ee1504631448ea495c4.zip |
Merge pull request #3348 from vrothberg/kill-error
kill: print ID and state for non-running containers
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 52d3afc0a..0e877d04e 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -180,7 +180,7 @@ func (c *Container) StopWithTimeout(timeout uint) error { if c.state.State == ContainerStateConfigured || c.state.State == ContainerStateUnknown || c.state.State == ContainerStatePaused { - return errors.Wrapf(ErrCtrStateInvalid, "can only stop created, running, or stopped containers. %s in state %s", c.ID(), c.state.State.String()) + return errors.Wrapf(ErrCtrStateInvalid, "can only stop created, running, or stopped containers. %s is in state %s", c.ID(), c.state.State.String()) } if c.state.State == ContainerStateStopped || @@ -203,7 +203,7 @@ func (c *Container) Kill(signal uint) error { } if c.state.State != ContainerStateRunning { - return errors.Wrapf(ErrCtrStateInvalid, "can only kill running containers") + return errors.Wrapf(ErrCtrStateInvalid, "can only kill running containers. %s is in state %s", c.ID(), c.state.State.String()) } defer c.newContainerEvent(events.Kill) |