Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-45318

network-tools pod-run-netns-command failed due to "ERROR: Can't get netns pid"

XMLWordPrintable

    • Moderate
    • Yes
    • 1
    • SDN Sprint 265
    • 1
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      network-tools pod-run-netns-command failed due to "ERROR: Can't get netns pid".
      Seems containerRuntime changed from runc to crun, so we need to update network-tools utils:
      https://github.com/openshift/network-tools/blob/1df82dfade80ce31b325dab703b37bf7e8924e99/debug-scripts/utils#L108 

      Version-Release number of selected component (if applicable):

      4.18.0-0.test-2024-11-27-013900-ci-ln-s87rfh2-latest

      How reproducible:

      always

      Steps to Reproduce:

      1. create test pod in namespace test
      $ oc get pod -n test
      NAME         READY   STATUS    RESTARTS   AGE
      hello-pod2   1/1     Running   0          22s
      
      2.run command "ip a" with network-tools script pod-run-netns-command       

      Actual results:

      $ ./network-tools pod-run-netns-command test hello-pod2 "ip route show"
      Temporary namespace openshift-debug-btzwc is created for debugging node...
      Starting pod/qiowang-120303-zb568-worker-0-5phll-debug ...
      To use host binaries, run `chroot /host`
      
      
      Removing debug pod ...
      Temporary namespace openshift-debug-btzwc was removed.
      error: non-zero exit code from debug container
      ERROR: Can't get netns pid   <--- Failed
      
      
      INFO: Running ip route show in the netns of pod hello-pod2
      Temporary namespace openshift-debug-l7xv4 is created for debugging node...
      Starting pod/qiowang-120303-zb568-worker-0-5phll-debug ...
      To use host binaries, run `chroot /host`
      nsenter: failed to parse pid: 'parse'
      
      
      Removing debug pod ...
      Temporary namespace openshift-debug-l7xv4 was removed.
      error: non-zero exit code from debug container
      ERROR: Command returned non-zero exit code, check output or logs.

      Expected results:

      run command with network-tools script pod-run-netns-command successfuly

      Additional info:

      There is no container running:
      $ oc debug node/qiowang-120303-zb568-worker-0-5phll
      Temporary namespace openshift-debug-hrr94 is created for debugging node...
      Starting pod/qiowang-120303-zb568-worker-0-5phll-debug ...
      To use host binaries, run `chroot /host`
      Pod IP: 192.168.2.190
      If you don't see a command prompt, try pressing enter.
      sh-5.1# chroot /host
      sh-5.1# runc list
      ID          PID         STATUS      BUNDLE      CREATED     OWNER
      sh-5.1#

              rh-ee-qiowang Qiong Wang
              rh-ee-qiowang Qiong Wang
              Qiong Wang Qiong Wang
              Ashley Hardin Ashley Hardin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: