Bug 1474262 - oc debug with not-exist node can not get clear error message
Summary: oc debug with not-exist node can not get clear error message
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.7.0
Assignee: Maciej Szulik
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-24 09:15 UTC by XiaochuanWang
Modified: 2019-11-21 17:35 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed: 2019-11-21 17:35:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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