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

Windows: Support local drivers internal, l2bridge and nat #3121

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

olljanat
Copy link
Contributor

@olljanat olljanat commented Feb 14, 2023

- What I did
This PR takes generic driver manager which @corhere built on moby/moby#44983 and includes it to Swarmkit instead of libnetwork like proposed on moby/moby#44983 (comment)

In additionally that driver manager is used to register internal , nat and l2bridge drivers for Windows so scenarios explained on moby/moby#44983 can be solved.

- How I did it
Copy/paste from that another PR, minimal refactoring to existing code to support it and revendor to remove libnetwork code which is not needed here anymore.

- How to test it
If we get CI to 🟢 it should enough.

- Description for the changelog

Copy link
Contributor

@corhere corhere left a comment

Choose a reason for hiding this comment

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

I messed up. I'm really sorry. The Linux/Darwin manager drivers are not all the same, despite my earlier claims. The dynamic manager driver will only work for the Windows network types.

manager/allocator/cnmallocator/drivers_network_linux.go Outdated Show resolved Hide resolved
manager/allocator/cnmallocator/drivers_network_windows.go Outdated Show resolved Hide resolved
manager/allocator/cnmallocator/manager.go Outdated Show resolved Hide resolved
manager/allocator/cnmallocator/manager.go Show resolved Hide resolved
manager/allocator/cnmallocator/manager.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
do that by utilizing new dynamic manager

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
@olljanat olljanat force-pushed the move-drv-manager branch 2 times, most recently from 5a0da59 to 5ffbc07 Compare February 14, 2023 22:14
@codecov-commenter
Copy link

Codecov Report

Merging #3121 (5a0da59) into master (b7708a5) will decrease coverage by 0.11%.
The diff coverage is 23.25%.

❗ Current head 5a0da59 differs from pull request most recent head 5ffbc07. Consider uploading reports for the commit 5ffbc07 to get more accurate results

@@            Coverage Diff             @@
##           master    #3121      +/-   ##
==========================================
- Coverage   61.73%   61.62%   -0.11%     
==========================================
  Files         153      154       +1     
  Lines       31099    31142      +43     
==========================================
- Hits        19198    19192       -6     
- Misses      10364    10402      +38     
- Partials     1537     1548      +11     

@olljanat
Copy link
Contributor Author

olljanat commented Feb 14, 2023

I messed up. I'm really sorry. The Linux/Darwin manager drivers are not all the same, despite my earlier claims. The dynamic manager driver will only work for the Windows network types.

I is not all that bad. As far I can see those was added by moby/libnetwork#1742 to support moby/moby#32981 it is just those two more parameters which was needed and we can use same logic for Linux too. Starting to look good for me as this will actually remove more vendored code than add new one.

EDIT: Oh, I can see it now when looked removed code in details so kicked it back to containing Windows only change for now.

Copy link
Contributor

@corhere corhere left a comment

Choose a reason for hiding this comment

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

LGTM! @dperny @neersighted PTAL

@olljanat
Copy link
Contributor Author

@dperny PTAL

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

5 participants