// StartContainer start a container func (c *Cluster) StartContainer(container *cluster.Container) error { c.RLock() defer c.RUnlock() if err := container.Engine.StartContainer(container, nil); err != nil { return err } _, err := container.Refresh() return err }
// StartContainer start a container func (c *Cluster) StartContainer(container *cluster.Container) error { c.RLock() defer c.RUnlock() if container, _ := container.Refresh(); container != nil { // As mesos garbage collect containers, we only allow starting on a "Created" containers if container.Info.State.Running == false && container.Info.State.FinishedAt.IsZero() { if err := container.Engine.StartContainer(container, nil); err != nil { _, err = container.Refresh() return err } } } return nil }