Bug 1771552 - oc debug node freezes on missing command executable
Summary: oc debug node freezes on missing command executable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.2.z
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.4.0
Assignee: Sally
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-12 15:26 UTC by Maciej Szulik
Modified: 2020-05-04 11:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 11:15:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 277 0 None closed Bug 1771552: Bug 1771553: Bug 1771549: Bug 1798549: oc debug 2021-02-19 03:36:34 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:15:34 UTC

Description Maciej Szulik 2019-11-12 15:26:03 UTC
Such command hangs:

$ oc debug node/node-name -- /bin/missing param1 param2

User does not see any feedback why command hangs. In fact pod fails to start due to missing executable. I suggest `oc` checks pod status and fails early in case pod fails to start for whatever reason. Also exit with proper error message to the user.

– Client Version: v4.2.0

Comment 3 zhou ying 2020-02-14 02:36:17 UTC
Confirmed with latest oc client, the issue has fixed:

[root@dhcp-140-138 ~]# oc version -o yaml 
clientVersion:
  buildDate: "2020-02-13T22:50:14Z"
  compiler: gc
  gitCommit: 5d7a12f03389b03b651f963cb5ee8ddfa9cff559
  gitTreeState: clean
  gitVersion: v4.4.0
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64


[root@dhcp-140-138 ~]# oc debug node/ip-xxxxxx  -- /bin/missing param1 param2
Starting pod/ip-xxxxxx-debug ...
To use host binaries, run `chroot /host`

Removing debug pod ...
error: container create failed: time="2020-02-14T02:34:39Z" level=error msg="container_linux.go:346: starting container process caused \"exec: \\\"/bin/missing\\\": stat /bin/missing: no such file or directory\""
container_linux.go:346: starting container process caused "exec: \"/bin/missing\": stat /bin/missing: no such file or directory"

Comment 5 errata-xmlrpc 2020-05-04 11:15:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0581


Note You need to log in before you can comment on or make changes to this bug.