e260e8f94d02a875da1986f84dc300b08841992e
This call was added as part of commit a042e5a20 and at the time was useful. sandbox.DisableService() basically calls endpoint.deleteServiceInfoFromCluster() for every endpoint in the sandbox. However, with the libnetwork change, endpoint.sbLeave() invokes endpoint.deleteServiceInfoFromCluster(). The releaseNetwork() call invokes sandbox.Delete() immediately after sandbox.DisableService(). The sandbox.Delete() in turn ultimately invokes endpoint.sbLeave() for every endpoint in the sandbox which thus removes the endpoint's load balancing entry via endpoint.deleteServiceInfoFromCluster(). So the call to sandbox.DisableService() is now redundant. It is noteworthy that, while redundant, the presence of the call would not cause errors. It would just be sub-optimal. The DisableService() call would cause libnetwork to down-weight the load balancing entries while the call to sandbox.Delete() would cause it to remove the entries immediately afterwards. Aside from the wasted computation, the extra call would also propagate an extra state change in the networkDB gossip messages. So, overall, it is much better to just avoid the extra overhead. Signed-off-by: Chris Telfer <ctelfer@docker.com> Upstream-commit: c27417aa7de46daa415600b39fc8a9c411c8c493 Component: engine
Description
No description provided
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%