Bug 1474262

Summary: oc debug with not-exist node can not get clear error message
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED CURRENTRELEASE QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Node name was not verified. Consequence: oc debug was failing with cryptic message. Fix: Verify passed node name from the list of existing nodes on the cluster. Result: oc debug is giving clear error when not existing node name is passed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-21 17:35:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description XiaochuanWang 2017-07-24 09:15:32 UTC
Description of problem:
oc debug with not-exist node, 3.5 output is clear 'Error from server (NotFound): nodes "invalidnode" not found', but 3.6 output is 'error: unable to create the debug pod "mydc-debug" on node "invalidnode"', which cannot tell clearly whether the node is an existent node that has problem "to create the debug pod", or the node name is a non-existent node

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

How reproducible:
Always

Steps to Reproduce:
1. $ oc run mydc --image=aosqe/hello-openshift
2. $ oc debug dc/mydc --node-name="notexist"
wait and check output

Actual results:
"""
Debugging with pod/python35-debug, original command: container-entrypoint /usr/libexec/s2i/run
Waiting for pod to start ...

Removing debug pod ...
error: unable to create the debug pod "mydc" on node "notexist"
"""

Expected results:
Message should be clear, eg. 3.5 cli output  'Error from server (NotFound): nodes "notexist" not found'

Additional info:

Comment 1 Juan Vallejo 2017-09-15 19:47:21 UTC
Origin PR: https://github.com/openshift/origin/pull/16387

Comment 2 XiaochuanWang 2017-09-26 08:53:25 UTC
Wait for verify when PR is merged to OCP.

Comment 3 XiaochuanWang 2017-09-27 08:31:26 UTC
Verified on latest OCP: oc v3.7.0-0.131.0

# oc debug dc/mydc --node-name="notexist"
Error from server (NotFound): nodes "notexist" not found

Comment 4 Xingxing Xia 2017-10-26 06:39:11 UTC
Reverted in bug 1505698