mirror of https://github.com/docker/docs.git
cluster: Don't lock the scheduler when removing a container.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
91279c8256
commit
24394612f5
|
@ -164,14 +164,9 @@ func (c *Cluster) createContainer(config *cluster.ContainerConfig, name string,
|
||||||
return container, err
|
return container, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveContainer aka Remove a container from the cluster. Containers should
|
// RemoveContainer aka Remove a container from the cluster.
|
||||||
// always be destroyed through the scheduler to guarantee atomicity.
|
|
||||||
func (c *Cluster) RemoveContainer(container *cluster.Container, force, volumes bool) error {
|
func (c *Cluster) RemoveContainer(container *cluster.Container, force, volumes bool) error {
|
||||||
c.scheduler.Lock()
|
return container.Engine.RemoveContainer(container, force, volumes)
|
||||||
defer c.scheduler.Unlock()
|
|
||||||
|
|
||||||
err := container.Engine.RemoveContainer(container, force, volumes)
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cluster) getEngineByAddr(addr string) *cluster.Engine {
|
func (c *Cluster) getEngineByAddr(addr string) *cluster.Engine {
|
||||||
|
|
Loading…
Reference in New Issue