Repository navigation
Commit f988b69
Ignore Docker's auto-assigned network Gateway when comparing IPAM pools
Some Docker engine versions auto-fill a pool's Gateway even when only a
Subnet was explicitly requested, while Salt's locally-built "desired" IPAM
config never includes a Gateway unless the user set one. compare_networks()
matched IPAM Config entries by strict dict equality, so this asymmetry was
reported as a real config change, making docker_network.present() think the
network needed recreating on every run (seen in
test_docker_network.py::test_bridge_dupname_update on Ubuntu 26.04's newer
Docker). Pair pools by Subnet and drop a Gateway key that's present on only
one side before comparing, while still catching genuinely different
explicit Gateway values.1 parent fed4c65 commit f988b69
1 file changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
1354 | | - | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1355 | 1379 | | |
1356 | 1380 | | |
1357 | 1381 | | |
| |||
0 commit comments