Fixes swarm overloading slaves when using the mesos drivers.

The problem is described here:
https://github.com/docker/swarm/issues/1588

This fix also allows reducing the offer timeout which reduces problems with mesos resource consolidation described here:
https://github.com/docker/swarm/issues/1655

Signed-off-by: Guillermo Rodriguez <grodriguez@cmcrc.com>
This commit is contained in:
Guillermo Rodriguez
2016-01-27 12:12:36 +11:00
parent b3aab8455d
commit b830f9f269

View File

@@ -444,6 +444,7 @@ func (c *Cluster) removeOffer(offer *mesosproto.Offer) bool {
found := s.removeOffer(offer.Id.GetValue())
if s.empty() {
// Disconnect from engine
s.engine.Disconnect()
delete(c.agents, offer.SlaveId.GetValue())
}
return found