daemon/server/router/container: fix back-filling of top-level network fields#51201
daemon/server/router/container: fix back-filling of top-level network fields#51201thaJeztah merged 2 commits intomoby:masterfrom
Conversation
… fields This was introduced in fc1ff44, which back-filled the top-level network-properties for the bridge network, but the fields ended up at the top-level of the response, not the top-level of the NetworkSettings. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The TestMacAddressIsAppliedToMainNetworkWithShortID was starting its own daemon, but the apiClient was created with the defaults, so was connecting to the global test-daemon. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
6bee56b to
b87ed45
Compare
| "IPAddress": bridgeNw.IPAddress, | ||
| "IPPrefixLen": bridgeNw.IPPrefixLen, | ||
| "IPv6Gateway": bridgeNw.IPv6Gateway, | ||
| "MacAddress": bridgeNw.MacAddress, |
There was a problem hiding this comment.
So, we don't add an extra MacAddress field to the Config struct because we forgot to add this migration in #47233?
There was a problem hiding this comment.
I think this version / PR still adds it, but through the daemon.GetInspectdata (or whatever it's called). The other PR removes that and puts it all in the router.
There was a problem hiding this comment.
The extra fields in NetworkSettings are quite separate from the Config.MacAddress - I think the rules are ...
The NetworkSettings fields are filled in with default bridge info, if the container's connected to the default bridge (and now, only if the API version is < 1.52).
The Config field is filled in with the MAC address from network HostConfig.NetworkMode, but only if the MAC is explicitly configured.
There was a problem hiding this comment.
I'll go ahead and bring this one in; IIUC; if something is needed (for v28.x??), we can fix it separately
This was introduced in fc1ff44, which
back-filled the top-level network-properties for the bridge network,
but the fields ended up at the top-level of the response, not the top-level
of the NetworkSettings.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)