Skip to content

Libnetwork: Refactor to use deterministic network order#689

Open
mheon wants to merge 1 commit intocontainers:mainfrom
mheon:ordered_networks
Open

Libnetwork: Refactor to use deterministic network order#689
mheon wants to merge 1 commit 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 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
@mheon
Copy link
Member Author

mheon commented Mar 18, 2026

Abandoning that plan since c/common doesn't actually have a Cirrus setup script and I don't feel like hacking one out that will just be ripped out once we get a proper NV build out. This can stay draft until we have a fresh NV ready to test with in the VMs.

@Luap99
Copy link
Member

Luap99 commented Mar 19, 2026

#705 is merged

@mheon mheon force-pushed the ordered_networks branch 2 times, most recently from 2f56e57 to a1d6eed Compare March 23, 2026 12:53
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 a1d6eed to c0ad2cd Compare March 25, 2026 08:18
@mheon
Copy link
Member Author

mheon commented Mar 25, 2026

containers/buildah#6722 for Buildah testing
containers/podman#28275 for Podman testing

Dropping WIP, though I do need to get everything rebased

@mheon mheon marked this pull request as ready for review March 25, 2026 08:18
@mheon mheon changed the title [WIP] Libnetwork: Refactor to use deterministic network order Libnetwork: Refactor to use deterministic network order Mar 25, 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.

2 participants