Error on attempting to restart container

Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #304
Approved by: baude
This commit is contained in:
Matthew Heon 2018-02-06 17:21:54 -05:00 committed by Atomic Bot
parent 367213a394
commit 8fbfb93947

View file

@ -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