-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
Add signal handler for catching Ctrl-C on hack/e2e #51143
Conversation
Hi @oomichi. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. I understand the commands that are listed here. |
/ok-to-test |
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.
Very cool! One quick comment
hack/e2e.go
Outdated
go func() { | ||
sig := <-sig_channel | ||
if err := c.Process.Signal(sig); err != nil { | ||
log.Fatalf("err: %v", err) |
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.
Please make the error message easier for a human to understand the context, something like
Fatalf("could not send %s signal %s: %v", cmd, sig, err)
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.
Thanks for your review.
Yeah, that should be. I will fix it soon.
/retest |
f7e23a3
to
13fd2fd
Compare
/retest |
When operating e2e test, hack/e2e.go process creates kubetest process. To kill the kubetest process when stop e2e test with Ctrl-C, we need to send the signal to the process because it also creates another process and it needs to kill it. This PR adds the signal handler on hack/e2e.go to kill the kubetest process. NOTE: kubernetes/test-infra#4154 is the part of kubetest. solve kubernetes#43051
Go @oomichi !!! |
@dims hehe, I am not sure which GO you mean. I am not good at GOlang yet anyways ;-) |
/release-note-none |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, oomichi Associated issue: 43051 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 |
Automatic merge from submit-queue (batch tested with PRs 51038, 50063, 51257, 47171, 51143) |
What this PR does / why we need it:
When operating e2e test, hack/e2e.go process creates kubetest process.
To kill the kubetest process when stop e2e test with Ctrl-C, we need
to send the signal to the process because it also creates another
process and it needs to kill it.
This PR adds the signal handler on hack/e2e.go to kill the kubetest
process.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #fixes #43051
Special notes for your reviewer:
kubernetes/test-infra#4154 is the part of kubetest.
Release note:
NONE