Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for port conflict with docker daemon. #1370

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

ameyag
Copy link
Contributor

@ameyag ameyag commented Apr 22, 2022

The libnetwork logic uses a dummy proxy to bind the ports for communication between container and host. WS 2019 Aug 2020 patch onwards, Windows started doing an early port reservation which conflicts with the aforementioned logic for overlay and host publish mode for the ports.

Adding ExternalPortReserved flag to NatPolicy for HNS API V1. This is a flag exposed for docker to avoid port reservation conflict with external port

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde agawde@mirantis.com

Verified the fix with private HostNetSvc.dll from Windows networking team and corresponding change on libnetwork to send down the flag ExternalPortReserved

… a flag exposed for docker to avoid port reservation conflict with external port

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
@ameyag ameyag requested a review from a team as a code owner April 22, 2022 16:46
@dcantah
Copy link
Contributor

dcantah commented Apr 22, 2022

I assume we'll need to get out a tag of hcsshim containing this and get it into moby?

@ameyag
Copy link
Contributor Author

ameyag commented Apr 22, 2022

@dcantah - Yes, we'll need a tag. Also, if this looks good, will put up a PR against hcsshim's moby branch for backport.

Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dcantah dcantah merged commit dbb347e into microsoft:master Apr 25, 2022
ameyag added a commit to ameyag/hcsshim that referenced this pull request Apr 25, 2022
… a flag exposed for docker to avoid port reservation conflict with external port (microsoft#1370)

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
(cherry picked from commit dbb347e)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
ameyag added a commit to ameyag/hcsshim that referenced this pull request Apr 25, 2022
… a flag exposed for docker to avoid port reservation conflict with external port (microsoft#1370)

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
(cherry picked from commit dbb347e)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
ameyag added a commit to ameyag/hcsshim that referenced this pull request May 2, 2022
… a flag exposed for docker to avoid port reservation conflict with external port (microsoft#1370)

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
(cherry picked from commit dbb347e)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
dcantah pushed a commit that referenced this pull request May 2, 2022
… a flag exposed for docker to avoid port reservation conflict with external port (#1370) (#1373)

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
(cherry picked from commit dbb347e)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
@ameyag ameyag deleted the external-port branch November 7, 2022 16:15
anmaxvl added a commit that referenced this pull request Feb 7, 2023
Sync ADO with upstream to enable including test GCS binaries as
part of dev-pipeline

Related work items: #1311, #1322, #1341, #1343, #1345, #1347, #1348, #1350, #1353, #1354, #1355, #1358, #1361, #1365, #1368, #1369, #1370
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
… a flag exposed for docker to avoid port reservation conflict with external port (microsoft#1370)

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants