moby--moby/daemon
Chris Telfer c27417aa7d Remove (now) extra call to sb.DisableService()
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>
2018-03-28 14:16:31 -04:00
..
caps
cluster
config
discovery
events
exec
graphdriver
images
initlayer
links
listeners
logger
names
network
stats
testdata
apparmor_default.go
apparmor_default_unsupported.go
archive.go
archive_tarcopyoptions.go
archive_tarcopyoptions_unix.go
archive_tarcopyoptions_windows.go
archive_unix.go
archive_windows.go
attach.go
auth.go
bindmount_unix.go
changes.go
checkpoint.go
cluster.go
commit.go
configs.go
configs_linux.go
configs_unsupported.go
configs_windows.go
container.go
container_linux.go
container_operations.go Remove (now) extra call to sb.DisableService() 2018-03-28 14:16:31 -04:00
container_operations_unix.go
container_operations_windows.go
container_unix_test.go
container_windows.go
create.go
create_test.go
create_unix.go
create_windows.go
daemon.go
daemon_linux.go
daemon_linux_test.go
daemon_test.go
daemon_unix.go
daemon_unix_test.go
daemon_unsupported.go
daemon_windows.go
daemon_windows_test.go
debugtrap_unix.go
debugtrap_unsupported.go
debugtrap_windows.go
delete.go
delete_test.go
dependency.go
disk_usage.go
errors.go
events.go
events_test.go
exec.go
exec_linux.go
exec_linux_test.go
exec_windows.go
export.go
health.go
health_test.go
info.go
info_unix.go
info_unix_test.go
info_windows.go
inspect.go
inspect_linux.go
inspect_test.go
inspect_windows.go
keys.go
keys_unsupported.go
kill.go
links.go
list.go
list_test.go
list_unix.go
list_windows.go
logdrivers_linux.go
logdrivers_windows.go
logs.go
logs_test.go
metrics.go
metrics_unix.go
metrics_unsupported.go
monitor.go
mounts.go
names.go
network.go
oci_linux.go
oci_linux_test.go
oci_windows.go
pause.go
prune.go
reload.go
reload_test.go
reload_unix.go
reload_windows.go
rename.go
resize.go
restart.go
seccomp_disabled.go
seccomp_linux.go
seccomp_unsupported.go
secrets.go
secrets_linux.go
secrets_unsupported.go
secrets_windows.go
selinux_linux.go
selinux_unsupported.go
start.go
start_unix.go
start_windows.go
stats.go
stats_collector.go
stats_unix.go
stats_windows.go
stop.go
top_unix.go
top_unix_test.go
top_windows.go
trustkey.go
trustkey_test.go
unpause.go
update.go
update_linux.go
update_windows.go
volumes.go
volumes_linux.go
volumes_linux_test.go
volumes_unit_test.go
volumes_unix.go
volumes_unix_test.go
volumes_windows.go
wait.go
workdir.go