feature: Populate NetworkSettings.Gateway#4771
feature: Populate NetworkSettings.Gateway#4771must108 wants to merge 1 commit intocontainerd:mainfrom
Conversation
Good suggestion, thanks! I'll add a Tigron e2e test that verifies that |
|
@haytok added the test |
AkihiroSuda
left a comment
There was a problem hiding this comment.
Please squash the commits
fc3cd88 to
c8e2272
Compare
haytok
left a comment
There was a problem hiding this comment.
When checking this CI Log, the test TestContainerInspectGateway you have added has failed, so please check your fix.
=== Failing tests ===
TestContainerInspectGateway
2b0bd48 to
ec66442
Compare
haytok
left a comment
There was a problem hiding this comment.
Before requesting a review, please make sure that the tests for the changes you’ve made have passed 🙏
| testCase.Run(t) | ||
| } | ||
|
|
||
| func TestContainerInspectGateway(t *testing.T) { |
There was a problem hiding this comment.
Have you already checked CI failures related to this fix?
Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> add test TestContainerInspectGateway Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> Fix test issues Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> Remove container.test Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> Resolve review and tests Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> feature: populate NetworkSettings.Gateway and add e2e coverage Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> Resolve test issues Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> feature: populate NetworkSettings.Gateway and add e2e coverage Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> drop unrelated hostsstore changes Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> Change testing feature: populate NetworkSettings.Gateway and add e2e coverage Resolve breaking tests Add gateway to docker inspect output Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev> Resolve test failures Signed-off-by: Mustaeen Ahmed <contact@mustaeen.dev>
ec66442 to
8f8e6fe
Compare
https://github.com/containerd/nerdctl/actions/runs/23119762664/job/67191519034?pr=4771 |
Resolves #415
Issue
NetworkSettings.Gatewayis expected to be present in inspect output.nerdctldid not expose this prior to this change, even when a default gateway existed.Changes
This pull request adds a feature that allows for
NetworkSettings.Gatewayto be populated innerdctl inspectoutput.How it works:
Collects default IPv4 gateway from the container network namespace during netns inspection
Stores the gateway in inspect network data
Propagates the value to
DefaultNetworkSettings.GatewayUnit tests have also been adjusted to reflect this change.
Testing
Notes