Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Apr 18, 2018

backports for 18.03 of:

moby/moby#36638, moby/moby#36774, and moby/moby#36840

moby/libnetwork@1b91bc9...c15b372

git checkout -b 18.03-bump-libnetwork upstream/18.03
git cherry-pick -s -S -x -Xsubtree=components/engine 50dbdeff9fd186bb0e9926996436e1f56529a831
git cherry-pick -s -S -x -Xsubtree=components/engine c27417aa7de46daa415600b39fc8a9c411c8c493
git cherry-pick -s -S -x -Xsubtree=components/engine b159da19734269c4a162763ebfa28dff07b703f3
git cherry-pick -s -S -x -Xsubtree=components/engine 248aed5766ba330ab8cb2b10b03b6ce57dc64283
git push -u origin 18.03-bump-libnetwork

no conflicts

ctelfer and others added 4 commits April 17, 2018 19:24
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]>
@thaJeztah thaJeztah added this to the 18.03.1 milestone Apr 18, 2018
@thaJeztah
Copy link
Member Author

ping @fcrisciani @ctelfer @cpuguy83 PTAL

@thaJeztah
Copy link
Member Author

https://jenkins.dockerproject.org/job/docker-ce-pr/775/execution/node/500/log/

03:23:11 --- FAIL: Test (1359.42s)
03:23:11 panic: DockerSwarmSuite.TestSwarmClusterRotateUnlockKey test timed out after 5m0s [recovered]
03:23:11 	panic: DockerSwarmSuite.TestSwarmClusterRotateUnlockKey test timed out after 5m0s
03:23:11 

Copy link
Contributor

@ctelfer ctelfer left a 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.

@andrewhsu andrewhsu merged commit 4fd6bf8 into docker-archive:18.03 Apr 18, 2018
@thaJeztah thaJeztah deleted the 18.03-bump-libnetwork branch April 18, 2018 23:42
silvin-lubecki pushed a commit to silvin-lubecki/docker-ce that referenced this pull request Jan 31, 2020
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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants