Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoneNetworkManager is presumably flaky wrt hostname #3971

Open
apostasie opened this issue Mar 4, 2025 · 5 comments
Open

NoneNetworkManager is presumably flaky wrt hostname #3971

apostasie opened this issue Mar 4, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@apostasie
Copy link
Contributor

Description

https://github.com/containerd/nerdctl/actions/runs/13644906693/job/38141881547?pr=3965#step:11:452

=== RUN   TestNoneNetworkHostName
=== PAUSE TestNoneNetworkHostName
=== CONT  TestNoneNetworkHostName
    container_run_network_linux_test.go:944: 
    container_run_network_linux_test.go:944: ======================== Pre-test cleanup ========================
    command.go:113: /usr/local/bin/nerdctl --namespace=nerdctl-test rm -f testnonenetworkhostname-e70856d3
    container_run_network_linux_test.go:944: 
    container_run_network_linux_test.go:944: ======================== Test setup ========================
    command.go:113: /usr/local/bin/nerdctl --namespace=nerdctl-test run -d --name testnonenetworkhostname-e70856d3 --network none ghcr.io/stargz-containers/nginx:1.19-alpine-org
    container_run_network_linux_test.go:944: 
    container_run_network_linux_test.go:944: ======================== Test Run ========================
    command.go:113: /usr/local/bin/nerdctl --namespace=nerdctl-test exec testnonenetworkhostname-e70856d3 cat /etc/hostname
    command.go:113: assertion failed: 
        --- compare
        +++ stdout
        @@ -1,2 +1 @@
        -0ba62cd1c8fe
         
        : 
        Command:  /usr/local/bin/nerdctl --namespace=nerdctl-test exec testnonenetworkhostname-e70856d3 cat /etc/hostname
        ExitCode: 0
        Stdout:   
        Stderr:   
        Env:
        HOSTNAME=3a911ce1281e
        container=docker
        HOME=/root
        LANG=C.UTF-8
        INVOCATION_ID=6eadd4f97625[456](https://github.com/containerd/nerdctl/actions/runs/13644906693/job/38141881547?pr=3965#step:11:457)0a6a1ac30bc97d4aa
        TERM=xterm
        SHLVL=3
        CGO_ENABLED=0
        _=/usr/local/bin/gotestsum
        PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        ***
        DOCKER_CONFIG=/tmp/TestNoneNetworkHostName1438939296/001
        NERDCTL_TOML=/tmp/TestNoneNetworkHostName1438939296/001/nerdctl.toml
    case.go:173: 
    case.go:174: ======================== Post-test cleanup ========================
    command.go:113: /usr/local/bin/nerdctl --namespace=nerdctl-test rm -f testnonenetworkhostname-e70856d3
--- FAIL: TestNoneNetworkHostName (0.64s)

Tagging @Shubhranshu153

Steps to reproduce the issue

Describe the results you received and expected

na

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

@apostasie apostasie added the kind/unconfirmed-bug-claim Unconfirmed bug claim label Mar 4, 2025
@AkihiroSuda AkihiroSuda added bug Something isn't working area/ci e.g., CI failure and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels Mar 4, 2025
@apostasie
Copy link
Contributor Author

@AkihiroSuda I do not think this is a CI/test issue at this point.
This seems like a code issue, possibly something racy in network setup with oci-hooks that shows on EL8 because they are much slower.

@Shubhranshu153
Copy link
Contributor

@apostasie
the test is running the container in detached mode is that impacting the test somehow?

@apostasie
Copy link
Contributor Author

apostasie commented Mar 5, 2025

@apostasie the test is running the container in detached mode is that impacting the test somehow?

Maybe? Actually, I just do not know. Would have to look into whether -d exits earlier somehow.

This is clearly a timing issue.

@apostasie
Copy link
Contributor Author

My money is on ocihooks.

@apostasie
Copy link
Contributor Author

apostasie commented Mar 5, 2025

Other similar issues are showing up on EL8 (because they are so slow):

https://github.com/containerd/nerdctl/actions/runs/13664285641/job/38202209142?pr=3982#step:11:470

This one is about TestHostNetworkDnsConfigs.

That would confirm my suspicion that there is a timing issue with ocihook doing something after the container starts (and that would be for all CNI network managers, not just None).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants