Skip to content

[CI]: TestNetworkInspect is flaky in windows #4322

Closed

Description

@Shubhranshu153

Description

Some of the subtest are flaky in network inspect test in windows.
Need to root cause.

Steps to reproduce the issue

Running the CI pipelines will occasionally reproduce this error.

Describe the results you received and expected

Expected test to pass.

What version of nerdctl are you using?

latest.

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

None

Host information

No response

Activity

  1. apostasie commented on Jun 17, 2025

    @apostasie
    Contributor

    @Shubhranshu153 can you add the log output? + the link to the build that failed?

  2. apostasie commented on Jun 17, 2025

    @apostasie
    Contributor

    eg:

    • linking the PR(s) that failed with this helps evaluating how prevalent this is
    • concrete log output avoids linking unrelated issues that may affect the same test
      :)
  3. apostasie commented on Jun 23, 2025

    @apostasie
    Contributor
              +------------------------------------------------------------------------------------------------------------+
              | ➡️      | ⚙️ C:\Users\runneradmin\go\bin\nerdctl.exe create --name testnetworkinspect-verify-that-only-act |
              |         | ive-containers-appear-in-the-0a54a379 --network testnetworkinspect-verify-that-only-active-conta |
              |         | iners-appear-in-the-844e8a21 registry.k8s.io/e2e-test-images/nginx:1.14-2                        |
              +------------------------------------------------------------------------------------------------------------+
              |         | 🚫 command returned a non-zero exit code                                                         |
              +------------------------------------------------------------------------------------------------------------+
              |         | ⚠️ 1                                                                                             |
              +------------------------------------------------------------------------------------------------------------+
              |         | 🟠 time="2025-06-22T21:52:24Z" level=warning msg="default network named \"nat\" does not have an |
              |         |  internal nerdctl ID or nerdctl-managed config file, it was most likely NOT created by nerdctl"  |
              |         | time="2025-06-22T21:52:24Z" level=warning msg="default network named \"nat\" does not have an in |
              |         | ternal nerdctl ID or nerdctl-managed config file, it was most likely NOT created by nerdctl"     |
              |         | time="2025-06-22T21:52:25Z" level=warning msg="networking setup error has occurred" error="plugi |
              |         | n type=\"nat\" failed (add): hcnCreateNetwork failed in Win32: The object already exists. (0x139 |
              |         | 2) {\"Success\":false,\"Error\":\"The object already exists. \",\"ErrorCode\":2147947410}"       |
              |         | time="2025-06-22T21:52:25Z" level=warning msg="default network named \"nat\" does not have an in |
              |         | ternal nerdctl ID or nerdctl-managed config file, it was most likely NOT created by nerdctl"     |
              |         | time="2025-06-22T21:52:25Z" level=fatal msg="plugin type=\"nat\" failed (add): hcnCreateNetwork  |
              |         | failed in Win32: The object already exists. (0x1392) {\"Success\":false,\"Error\":\"The object a |
              |         | lready exists. \",\"ErrorCode\":2147947410}"        
    
    
  4. apostasie commented on Jun 23, 2025

    @apostasie
    Contributor

    Wondering if windows network create is asynchronous...

  5. apostasie commented on Jul 2, 2025

    @apostasie
    Contributor

    https://github.com/microsoft/windows-container-networking/blob/master/common/core/network.go#L145

    So, the windows CNI plugin will create the network if it does not exist during CmdAdd (this is just plain wrong).

    https://github.com/microsoft/windows-container-networking/blob/master/common/core/network.go#L399-L421

    Why is it not finding the existing network (GetNetworkByName)? Unclear. Maybe hcnEnumerateNetworks is somehow faulty.

  6. apostasie commented on Jul 2, 2025

    @apostasie
    Contributor

    Also note that reading through that stuff, most of it does not seem safe to use concurrently...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions