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

Flaky debug pod return code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Critical Critical
    • 4.15.0
    • 4.14.0
    • oc
    • None
    • Critical
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
       ---------- edited for release notes ----------
      * Previously, if a user runs a command in `oc debug`. such as `oc debug node/worker -- sleep 5; exit 1`, without attaching to the terminal, a `0` exit code was always returned regardless of the command's exit code. With this release, the exit code is now properly returned from the command. (link:https://issues.redhat.com/browse/OCPBUGS-20342[*OCPBUGS-20342*])
       ---------- original text ----------
      If user runs a command in oc debug without attaching to terminal such as `oc debug node/worker -- sleep 5; exit 1`, we were returning zero exit code regardless of the command's exit code. After this patch, we start reflecting the exit code(example I gave above will return 1 not 0).
      Show
       ---------- edited for release notes ---------- * Previously, if a user runs a command in `oc debug`. such as `oc debug node/worker -- sleep 5; exit 1`, without attaching to the terminal, a `0` exit code was always returned regardless of the command's exit code. With this release, the exit code is now properly returned from the command. (link: https://issues.redhat.com/browse/OCPBUGS-20342 [* OCPBUGS-20342 *])  ---------- original text ---------- If user runs a command in oc debug without attaching to terminal such as `oc debug node/worker -- sleep 5; exit 1`, we were returning zero exit code regardless of the command's exit code. After this patch, we start reflecting the exit code(example I gave above will return 1 not 0).
    • Bug Fix
    • Done

      Description of problem:

      As a part of the forbidden node label e2e test, we execute `oc debug` command to set the forbidden labels on the node. The `oc debug` command is expected to fail while applying the forbidden label. 

       

      In our testing, we observed that even though the actual command on the node (kubectl label node/<node> <forbidden_label>) expectedly fails, the `oc debug` command does not carry the return code correctly (it will return 0, even though `kubectl label` fails with error). 

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

      4.14

      How reproducible:

      flaky

      Steps to Reproduce:

      1. Run the test at https://gist.github.com/harche/c9143c382cfe94d7836414d5ccc0ba45
      2. Observe that sometimes it flakes at https://gist.github.com/harche/c9143c382cfe94d7836414d5ccc0ba45#file-test-go-L39
      

      Actual results:

      oc debug return value flakes

      Expected results:

      oc debug return value should be consistent. 

      Additional info:

       

              aguclu@redhat.com Arda Guclu
              harpatil@redhat.com Harshal Patil
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: