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: Always 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 3. 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.
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?
We are going to do client-side validation.
Fixed in https://github.com/openshift/origin/pull/8628.
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.
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/RHSA-2016:1064