mirror of https://github.com/docker/docs.git
Merge pull request #1786 from vieux/fix_missing_event_rescheduling
fix missing event on rescheduling
This commit is contained in:
commit
af74afabbc
|
@ -160,7 +160,7 @@ func (e *Engine) StartMonitorEvents() {
|
|||
e.client.StartMonitorEvents(e.handler, ec)
|
||||
|
||||
go func() {
|
||||
if err := <-ec; err != nil && err.Error() != "EOF" {
|
||||
if err := <-ec; err != nil && !strings.Contains(err.Error(), "EOF") {
|
||||
log.WithFields(log.Fields{"name": e.Name, "id": e.ID}).Errorf("Error monitoring events: %s", err)
|
||||
} else if err != nil {
|
||||
log.WithFields(log.Fields{"name": e.Name, "id": e.ID}).Debug("EOF monitoring events, restarting")
|
||||
|
|
|
@ -45,7 +45,7 @@ func (w *Watchdog) removeDuplicateContainers(e *Engine) {
|
|||
|
||||
for _, containerInCluster := range w.cluster.Containers() {
|
||||
if containerInCluster.Config.SwarmID() == container.Config.SwarmID() && containerInCluster.Engine.ID != container.Engine.ID {
|
||||
log.Debugf("container %s was rescheduled on node %s, removing it\n", container.Id, containerInCluster.Engine.ID)
|
||||
log.Debugf("container %s was rescheduled on node %s, removing it", container.Id, containerInCluster.Engine.ID)
|
||||
// container already exists in the cluster, destroy it
|
||||
e.RemoveContainer(container, true, true)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue