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 1771552: Bug 1771553: Bug 1771549: Bug 1798549: oc debug #277
Conversation
@sallyom: This pull request references Bugzilla bug 1771552, 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:
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. |
@sallyom: This pull request references Bugzilla bug 1771552, which is valid. In response to this:
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. |
/retest |
@sallyom: This pull request references Bugzilla bug 1771552, which is valid. In response to this:
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. |
1 similar comment
@sallyom: This pull request references Bugzilla bug 1771552, which is valid. In response to this:
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. |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left you comments.
7707ef9
to
c8a4604
Compare
@sallyom: This pull request references Bugzilla bug 1771552, which is valid. In response to this:
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. |
2 similar comments
@sallyom: This pull request references Bugzilla bug 1771552, which is valid. In response to this:
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. |
@sallyom: This pull request references Bugzilla bug 1771552, which is valid. In response to this:
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. |
/retest |
b050832
to
5ee97d7
Compare
@sallyom: This pull request references Bugzilla bug 1771552, which is valid. In response to this:
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. |
new output: $ oc debug node/nodename -- false
Starting pod/sotest-lf2xg-w-b-hwwj9copenshift-gce-develinternal-debug ...
To use host binaries, run `chroot /host`
Removing debug pod ...
error: non-zero exit code from debug container
$ echo $?
1
$ oc debug node/nodename -- /bin/foo
Starting pod/sotest-lf2xg-w-b-hwwj9copenshift-gce-develinternal-debug ...
To use host binaries, run `chroot /host`
Removing debug pod ...
error: container create failed: time="2020-02-11T19:31:53Z" level=error msg="container_linux.go:346: starting container process caused \"exec: \\\"/bin/foo\\\": stat /bin/foo: no such file or directory\""
container_linux.go:346: starting container process caused "exec: \"/bin/foo\": stat /bin/foo: no such file or directory"
$ echo $?
1
$ oc debug node/nodename -- ls -al /foo
Starting pod/sotest-lf2xg-w-b-hwwj9copenshift-gce-develinternal-debug ...
To use host binaries, run `chroot /host`
Removing debug pod ...
error: ls: cannot access /foo: No such file or directory
$ echo $?
1
$ oc debug node/nodename -- ls
Starting pod/sotest-lf2xg-w-b-hwwj9copenshift-gce-develinternal-debug ...
To use host binaries, run `chroot /host`
Removing debug pod ...
error: Back-off pulling image "registry.redhat.io/rhel7/foo"
$ echo $?
1
$ oc debug node/nodename -- true
Starting pod/sotest-lf2xg-w-b-hwwj9copenshift-gce-develinternal-debug ...
To use host binaries, run `chroot /host`
Removing debug pod ...
$ echo $?
0 |
4e196e2
to
dda61ac
Compare
@@ -453,20 +453,14 @@ func (o *DebugOptions) RunDebug() error { | |||
} | |||
return fmt.Errorf(msg) | |||
// switch to logging output | |||
case err == krun.ErrPodCompleted, err == conditions.ErrContainerTerminated, !o.Attach.Stdin: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My proposal for this switch:
case err == krun.ErrPodCompleted, err == conditions.ErrContainerTerminated, !o.Attach.Stdin:
return o.logsOptions(pod)
case err == conditions.ErrNonZeroExitCode:
o.logsOptions(pod)
return conditions.ErrNonZeroExitCode
case err != nil:
return err
case !o.Attach.Stdin:
return o.logsOptions(pod)
oh, and please change logsOptions
to getLogs
or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated - but handled the error from geLogs(pod) - or should I not? :
case err == conditions.ErrNonZeroExitCode:
if err = o.getLogs(pod); err != nil {
return err
}
return conditions.ErrNonZeroExitCode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect 👍
Bug 1771549: oc debug pod logs to stderr if container exit code != 0 Bug 1798549: oc debug fail quickly on errimagepull
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sallyom, 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:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
8 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@sallyom: All pull requests linked via external trackers have merged. Bugzilla bug 1771552 has been moved to the MODIFIED state. In response to this:
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. |
/assign @soltysh
1 commit:
In case of bad command passed to oc debug, user will now get information about why the command failed to run, and also will not have to wait the Timeout (15 min) to get the output.
2 commit:
If container exit code != 0, debug cmd should report non-zero
oc debug pod logs should go to stderr if container exit code != 0
oc debug node/nodename should fail quickly if debug pod image pull fails