docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

Fix possible errant time computation #2837

Closed dperny closed 6 years ago

dperny commented 6 years ago

In cluster/engine.go, we compute a delta between the manager and the engine. However, we do several blocking operations between the time we get the engine info, and the time we get the manager system. If those blocking operations take an abnormally long time, the user will be warned of a long time split, and the delta will be incorrect.

This patch moves computation of the delta to immediately after the Info call, so that the subsequent blocking operations do not affect it.

nishanttotla commented 6 years ago

Ping @wsong @vieux