summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-02-06 17:21:54 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-07 01:56:11 +0000
commit8fbfb93947d6885f1a3d7b2fb3159a081f4d193e (patch)
treea4d520459cb79ad88717a080529b5bdfe0865127
parent367213a3943961126c6f7c1dce45c7fafea9e6b2 (diff)
downloadpodman-8fbfb93947d6885f1a3d7b2fb3159a081f4d193e.tar.gz
podman-8fbfb93947d6885f1a3d7b2fb3159a081f4d193e.tar.bz2
podman-8fbfb93947d6885f1a3d7b2fb3159a081f4d193e.zip
Error on attempting to restart container
Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #304 Approved by: baude
-rw-r--r--libpod/container_api.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 05b3e89e6..3e1d600a8 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -313,6 +313,11 @@ func (c *Container) Start() error {
return errors.Wrapf(ErrCtrStateInvalid, "container %s must be in Created or Stopped state to be started", c.ID())
}
+ // TODO remove this when we patch conmon to support restarting containers
+ if c.state.State == ContainerStateStopped {
+ return errors.Wrapf(ErrNotImplemented, "restarting a stopped container is not yet supported")
+ }
+
// Mount storage for the container
if err := c.mountStorage(); err != nil {
return err