mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
50dbdeff9f
This patch allows endpoints to complete servicing connections while being removed from a service. The fix is entirely within libnetwork and requires no changes to the moby codebase proper. It operates by initially down-weighting a container endpoint in the load balancer to 0 while keeping the endpoint present in the load balancer. This allows traffic to continue to flow to the endpoint while preventing new connections from going to the endpoint. This allows the container to complete requests during the "stop_grace_period" and then exit when finished without interruption of service. This change requires propagating the status of disabled service endpoints via the networkDB. Accordingly, the patch includes both code to generate and handle service update messages. It also augments the service structure with a ServiceDisabled boolean to convey whether an endpoint should ultimately be removed or just disabled. This, naturally, required a rebuild of the protocol buffer code. The protocol buffer encoding is designed to support additions of fields to messages in a backwards-compatible manner. Protocol buffer unmarshalling code automatically skips past any fields that it isn't aware of. As a result, an older moby daemon without this fix can receive and will process correctly networkDB messages from newer moby daemons with this patch. As it turns out, the additional field is simply a bool that is otherwise irrelevent on networkDB create and delete events. So its absence in older moby daemon processing has no impact. However, the fix leverages the "update" networkDB message which was previously unused in libnetwork. Although older libnetwork implementations parse the message cleanly, they will see the message as unexpected and as such issue a log at error level indicating the receipt of such. Other than this there should be no other negative impact for use of this patch in mixed environments. (Although older mobys won't be able to gracefully downgrade connections on their nodes of course.) Signed-off-by: Chris Telfer <ctelfer@docker.com> |
||
---|---|---|
.. | ||
armon | ||
aws/aws-sdk-go | ||
Azure/go-ansiterm | ||
beorn7/perks | ||
boltdb/bolt | ||
bsphere/le_go | ||
BurntSushi/toml | ||
cloudflare/cfssl | ||
containerd | ||
coreos | ||
deckarep/golang-set | ||
dmcgowan/go-tar | ||
docker | ||
fluent/fluent-logger-golang | ||
fsnotify/fsnotify | ||
go-check/check | ||
go-ini/ini | ||
godbus/dbus | ||
gogo/protobuf | ||
golang | ||
googleapis/gax-go | ||
gorilla | ||
gotestyourself/gotestyourself | ||
Graylog2/go-gelf | ||
grpc-ecosystem/go-grpc-prometheus | ||
hashicorp | ||
imdario/mergo | ||
inconshreveable/mousetrap | ||
ishidawataru/sctp | ||
jmespath/go-jmespath | ||
kr/pty | ||
mattn/go-shellwords | ||
matttproud/golang_protobuf_extensions | ||
Microsoft | ||
miekg/dns | ||
mistifyio/go-zfs | ||
moby/buildkit | ||
Nvveen/Gotty | ||
opencontainers | ||
pborman/uuid | ||
philhofer/fwd | ||
pivotal-golang/clock | ||
pkg/errors | ||
pmezard/go-difflib | ||
prometheus | ||
RackSec/srslog | ||
samuel/go-zookeeper | ||
sean-/seed | ||
seccomp/libseccomp-golang | ||
sirupsen/logrus | ||
spf13 | ||
stevvooe/ttrpc | ||
syndtr/gocapability | ||
tchap/go-patricia | ||
tinylib/msgp | ||
tonistiigi/fsutil | ||
ugorji/go | ||
vbatts/tar-split | ||
vdemeester/shakers | ||
vishvananda |