Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1330050 - Output info is not correct when debug a pod with invalid node name.
Output info is not correct when debug a pod with invalid node name.
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: 3.2.1
Assigned To: Fabiano Franz
Wei Sun
: Regression
Depends On:
Blocks: 1345805
  Show dependency treegraph
Reported: 2016-04-25 06:52 EDT by Yanping Zhang
Modified: 2016-06-13 04:46 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1345805 (view as bug list)
Last Closed: 2016-05-12 12:36:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1064 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 3.2 security, bug fix, and enhancement update 2016-05-12 16:19:17 EDT

  None (edit)
Description Yanping Zhang 2016-04-25 06:52:44 EDT
Description of problem:
When debug a pod with option --node-name, set an invalid node name, it prompts error info, but the info is not correct.

Version-Release number of selected component (if applicable):
oc v1.2.0-rc1-17-g642f0af
openshift v1.2.0-rc1-17-g642f0af
kubernetes v1.2.0-36-g4a3f9c5

How reproducible:

Steps to Reproduce:
1.Create pod using dc file.
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/dc-with-two-containers.yaml
2.Debug with invalid node name:
$ oc debug dc/dctest  --node-name=invalidnode -- /bin/env

Actual results:
2.It prompts info about pods not found:
$ oc debug dc/dctest  --node-name=invalidnode -- /bin/env
Debugging with pod/dctest-debug, original command: <image entrypoint>
Waiting for pod to start ...

Removing debug pod ...
error: unable to delete the debug pod "dctest-debug": pods "dctest-debug" not foundError from server: pods "dctest-debug" not found

Expected results:
2.Should prompt info that the node "invalidnode" not found, but not the info that pod not found.

Additional info:
If `oc get pod --watch` in another terminal, pod "dctest-debug" is watched though.
Comment 1 Fabiano Franz 2016-04-25 15:13:36 EDT
We don't validate --node-name client-side, we just set pod.Spec.NodeName and rely on the API validation instead. 

It seems that until v1.1.4 the pod creation would error out right away with "nodes <node name> not found" in case of an invalid pod.Spec.NodeName, and starting with v1.1.5 the pod gets scheduled and errors later, async to the API call. So likely related to a rebase prior to that version. Probably related: https://github.com/kubernetes/kubernetes/commit/496fc3c7eda5c21d67c17fc2dcf9d3ec847f3c26#diff-2f2856ed0f6487c4906b43ac137117c3L40.

Andy, can you confirm?
Comment 2 Fabiano Franz 2016-04-25 18:50:24 EDT
We are going to do client-side validation.
Comment 3 Fabiano Franz 2016-04-27 09:39:42 EDT
Fixed in https://github.com/openshift/origin/pull/8628.
Comment 4 Yanping Zhang 2016-04-27 23:30:41 EDT
Tested on devenv-fedora_4053

$ oc version
oc v1.3.0-alpha.0-167-g4589987
kubernetes v1.3.0-alpha.1-331-g0522e63

$ oc debug -n prozyp dc/testpod --node-name=invalidnode -- /bin/env 
Debugging with pod/testpod-debug, original command: <image entrypoint>
Waiting for pod to start ...

Removing debug pod ...
error: unable to create the debug pod "testpod-debug" on node "invalidnode"

Now the output has been updated with correct info, so move the bug to Verified.
Comment 6 errata-xmlrpc 2016-05-12 12:36:26 EDT
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.


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