Skip to content

[WIP] Libnetwork: Refactor to use deterministic network order#689

Draft
mheon wants to merge 2 commits intocontainers:mainfrom
mheon:ordered_networks
Draft

[WIP] Libnetwork: Refactor to use deterministic network order#689
mheon wants to merge 2 commits intocontainers:mainfrom
mheon:ordered_networks

Conversation

@mheon
Copy link
Member

@mheon mheon commented Mar 10, 2026

Replace map[string]PerNetworkOptions - which does not convey a deterministic order as to when networks are processed - with []NamedPerNetworkOptions, which has a defined iteration order. As we lose the key of the map (network named), we have to stick it in the struct (NamedPerNetworkOptions, which is a
PerNetworkOptions with a string added).

This should be compatible with the new Netavark JSON format added in containers/netavark#1369 by @Luap99

This is NOT fully tested, but since I needed to push to vendor into Podman/Buildah to make that testing happen, I figured I'd open a draft PR.

@github-actions github-actions bot added the common Related to "common" package label Mar 10, 2026
@mheon mheon marked this pull request as draft March 10, 2026 18:02
@mheon mheon force-pushed the ordered_networks branch 3 times, most recently from 4a56159 to ede40e6 Compare March 16, 2026 18:59
@packit-as-a-service
Copy link

Packit jobs failed. @containers/packit-build please check.

@mheon mheon force-pushed the ordered_networks branch from ede40e6 to 3a7cdbf Compare March 16, 2026 19:08
@mheon
Copy link
Member Author

mheon commented Mar 17, 2026

Going to add my commit to build NV from source to see if the tests start passing

mheon added 2 commits March 17, 2026 12:49
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Replace map[string]PerNetworkOptions - which does not convey a
deterministic order as to when networks are processed - with
[]NamedPerNetworkOptions, which has a defined iteration order. As
we lose the key of the map (network named), we have to stick it
in the struct (NamedPerNetworkOptions, which is a
PerNetworkOptions with a string added).

This should be compatible with the new Netavark JSON format added
in containers/netavark#1369 by @Luap99

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
@mheon mheon force-pushed the ordered_networks branch from 3a7cdbf to 814488c Compare March 17, 2026 16:49
@github-actions github-actions bot added the storage Related to "storage" package label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant