From 8fbfb93947d6885f1a3d7b2fb3159a081f4d193e Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 6 Feb 2018 17:21:54 -0500 Subject: Error on attempting to restart container Signed-off-by: Matthew Heon Closes: #304 Approved by: baude --- libpod/container_api.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpod') 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 -- cgit v1.2.3-54-g00ecf