This repository was archived by the owner on Oct 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[18.03] Update libnetwork #514
Merged
andrewhsu
merged 4 commits into
docker-archive:18.03
from
thaJeztah:18.03-bump-libnetwork
Apr 18, 2018
Merged
[18.03] Update libnetwork #514
andrewhsu
merged 4 commits into
docker-archive:18.03
from
thaJeztah:18.03-bump-libnetwork
Apr 18, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]> (cherry picked from commit 50dbdeff9fd186bb0e9926996436e1f56529a831) Signed-off-by: Sebastiaan van Stijn <[email protected]>
This call was added as part of commit a042e5a 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 <[email protected]> (cherry picked from commit c27417aa7de46daa415600b39fc8a9c411c8c493) Signed-off-by: Sebastiaan van Stijn <[email protected]>
…rules * libnetwork#2121: Retry other external DNS servers on ServFail * libnetwork#2125: Fix README flag and expose orphan network peers * libnetwork#2126: Adding goreport card * libnetwork#2130: Modify awk to use cut in check_ip_overlap * libnetwork#2117: [Carry 1534] Improve scalabiltiy of bridge network isolation rules Full changes: moby/libnetwork@2bf6330...5c1218c Signed-off-by: Akihiro Suda <[email protected]> (cherry picked from commit b159da19734269c4a162763ebfa28dff07b703f3) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Full diff moby/libnetwork@5c1218c...c15b372 Fixes a panic on concurrent read/write to a map. Signed-off-by: Brian Goff <[email protected]> (cherry picked from commit 248aed5766ba330ab8cb2b10b03b6ce57dc64283) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
ping @fcrisciani @ctelfer @cpuguy83 PTAL |
Member
Author
|
https://jenkins.dockerproject.org/job/docker-ce-pr/775/execution/node/500/log/ |
ctelfer
approved these changes
Apr 18, 2018
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
moby/libnetwork#2112 does not fix a regression from moby/moby#35960. moby/moby#35960 did not cause any errors/regressions that I know of. Its code was just redundant with the libnetwork adjustments required for graceful load balancer removal.
silvin-lubecki
pushed a commit
to silvin-lubecki/docker-ce
that referenced
this pull request
Jan 31, 2020
…twork [18.03] Update libnetwork
docker-jenkins
pushed a commit
that referenced
this pull request
Dec 10, 2020
Revert "systemd: add multi-user.target to After list" Upstream-commit: 747e984 Component: packaging
docker-jenkins
pushed a commit
that referenced
this pull request
May 19, 2021
Revert "systemd: add multi-user.target to After list" Upstream-commit: 04361ba7e5390204ab5a3eca56e845d78402e8da Component: engine
akrasnov-drv
pushed a commit
to drivenets/docker-ce
that referenced
this pull request
Apr 23, 2023
…tiuser Revert "systemd: add multi-user.target to After list"
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backports for 18.03 of:
moby/moby#36638, moby/moby#36774, and moby/moby#36840
moby/libnetwork@1b91bc9...c15b372
no conflicts