Pass IPAM options when creating networks - #13936
Conversation
glours
left a comment
There was a problem hiding this comment.
A few changes to improve readability and avoid confusion between the two IPAM definition blocks.
0cfa001 to
078eace
Compare
|
Addressed the review feedback in
Rebased on latest
|
7d1e107 to
d35b2c8
Compare
|
Rebased on current main and addressed the review feedback by keeping IPAM construction in one place and using distinct test values. Local validation:
|
|
The failing check is Locally against current Could a maintainer re-run the flaky |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Signed-off-by: Ousama Ben Younes <benyounes.ousama@gmail.com>
Signed-off-by: Ousama Ben Younes <benyounes.ousama@gmail.com>
d35b2c8 to
121efdb
Compare
createNetwork built the IPAM object in two separate blocks; the second silently overwrote createOpts.IPAM with a fresh empty struct and never forwarded n.Ipam.Options to the daemon. Consolidate into a single block covering driver, config pool, and options. Fixes docker#13785 Supersedes docker#13936 Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
createNetwork built the IPAM object in two separate blocks; the second silently overwrote createOpts.IPAM with a fresh empty struct and never forwarded n.Ipam.Options to the daemon. Consolidate into a single block covering driver, config pool, and options. Fixes #13785 Supersedes #13936 Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
Summary
networks.*.ipam.optionsthrough to Docker network creation.Fixes #13785
Test verification (RED -> GREEN)
make testinitially reportedDONE 497 tests, 2 skipped, 1 failure; the pre-existing failure waspkg/watch TestGitBranchSwitch.pkg/compose/create.goreverted,TestExecutePlanCreateNetworkWithIPAMOptionsfailed becauseopts.IPAMwasnilinstead of containingOptions: {"ipam-option": "enabled"}.go test ./pkg/compose -run TestExecutePlanCreateNetworkWithIPAMOptions -count=1 -vpassed.Full local suite
make testDONE 499 tests, 2 skippedafter rebasing on latest main.