Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure node exists if --node-name given #16387

Conversation

juanvallejo
Copy link
Contributor

Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1474262

Ensures a node exists before creating a debug pod (if a nodeName is specified using --node-name).
If a nodeName is not specified, current behavior is unchanged.

Before

$ oc debug dc/mydc --node-name="nonexistent"
Debugging with pod/<pod>, 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 "nonexistent"

After

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

cc @openshift/cli-review

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 15, 2017
@fabianofranz
Copy link
Member

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 22, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabianofranz, juanvallejo

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 22, 2017
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 16439, 16218, 16387, 16509)

@openshift-merge-robot openshift-merge-robot merged commit 6cfb8e4 into openshift:master Sep 23, 2017
@juanvallejo juanvallejo deleted the jvallejo/ensure-node-exists branch September 25, 2017 14:43
juanvallejo added a commit to juanvallejo/origin that referenced this pull request Oct 24, 2017
PR openshift#16387 prevented a debug pod from being created at all, if a
specified node-name pointed to a node that did not exist.

Although the patch aimed to make "debug" command failures more
immediate, a client should not attempt to retrieve a specific node in
the "debug" command, as there is no guarantee that the user has access
to retrieve node information. While this means that the "debug" command
openshift-merge-robot added a commit that referenced this pull request Oct 24, 2017
Automatic merge from submit-queue.

prevent client from looking up specific node in `oc debug`

Reverts #16387
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1505698

PR #16387 prevented a debug pod from being created at all, if a
specified node-name pointed to a node that did not exist.

Although the patch aimed to make "debug" command failures more
immediate, a client should not attempt to retrieve a specific node in
the "debug" command, as there is no guarantee that the user has access
to retrieve node information. While this means that the "debug" command

cc @openshift/cli-review @smarterclayton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants