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

Bug 1779331: Fix a number of issues around debugging daemonset pods and init containers #166

Merged
merged 5 commits into from Dec 3, 2019

Conversation

smarterclayton
Copy link
Contributor

A bunch of small minor fixes. After these, I was able to debug the init container of the node exporter daemonset host network pod.

When using `oc debug istag/foo:bar` it is not uncommon to want to
create the debug pod in another namespace. Make that possible by
adding `--to-namespace` which overrides the pod namespace.
The implication of --one-container is that we only want a single
container.
If a user specifies an init container, we have to preserve it even
if `--keep-init-containers=false` is set. In that case, we strip
all other init containers.
If there is a host port set, clear it. If this is a host network pod,
clear all ports. This allows us to debug a pod on the same node for
daemonsets that declare host network or host pods.
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2019
Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest looks reasonable, but why --to-namespace?

@@ -362,6 +364,9 @@ func (o *DebugOptions) RunDebug() error {
if len(ns) == 0 {
ns = o.Namespace
}
if len(o.ToNamespace) > 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this different from explicitly using --namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example is:

oc debug istag/cli:latest -n openshift —to-namespace=my-test-ns

For when you don’t have write access in the namespace that contains the thing you want to debug.

@smarterclayton
Copy link
Contributor Author

Any other comments?

@smarterclayton
Copy link
Contributor Author

@soltysh I want this in 4.3, so if you have any other comments let me know soon

@soltysh
Copy link
Member

soltysh commented Dec 3, 2019

@soltysh I want this in 4.3, so if you have any other comments let me know soon

nope, this is good
/cherry-pick release-4.3

@openshift-cherrypick-robot

@soltysh: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you.

In response to this:

@soltysh I want this in 4.3, so if you have any other comments let me know soon

nope, this is good
/cherry-pick release-4.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton, soltysh

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [smarterclayton,soltysh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

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

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

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

@smarterclayton
Copy link
Contributor Author

/cherry-pick release-4.3

@openshift-cherrypick-robot

@smarterclayton: once the present PR merges, I will cherry-pick it on top of release-4.3 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@smarterclayton smarterclayton changed the title Fix a number of issues around debugging daemonset pods and init containers Bug 1779331: Fix a number of issues around debugging daemonset pods and init containers Dec 3, 2019
@openshift-ci-robot
Copy link

@smarterclayton: This pull request references Bugzilla bug 1779331, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Bug 1779331: Fix a number of issues around debugging daemonset pods and init containers

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Dec 3, 2019
@openshift-bot
Copy link
Contributor

/retest

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

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit cf57ef9 into openshift:master Dec 3, 2019
@openshift-ci-robot
Copy link

@smarterclayton: All pull requests linked via external trackers have merged. Bugzilla bug 1779331 has been moved to the MODIFIED state.

In response to this:

Bug 1779331: Fix a number of issues around debugging daemonset pods and init containers

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-cherrypick-robot

@soltysh: new pull request created: #200

In response to this:

@soltysh I want this in 4.3, so if you have any other comments let me know soon

nope, this is good
/cherry-pick release-4.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants