-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
agnhost: support --delay-shutdown flag for the net and netexec subcommands #108750
agnhost: support --delay-shutdown flag for the net and netexec subcommands #108750
Conversation
@andrewsykim: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewsykim 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 |
time.Sleep(time.Duration(terminationGracePeriodSeconds) * time.Second) | ||
} | ||
|
||
os.Exit(0) |
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.
Contemplating this instead:
exitCh <- shutdownRequest{
code: 0,
timeout: time.Second,
}
But it assumes that the exit handler is already running when SIGTERM is received, which we can't guarentee
/hold (using --delay-shutdown from nettest might actually meet my use-case https://github.com/kubernetes/kubernetes/blob/master/test/images/agnhost/nettest/nettest.go#L91, will test this first) |
dea88fa
to
ddb7f10
Compare
/hold cancel After reviewing some usages of these subcommands, I think it would be useful to just extend net and netexec to have a --delay-shutdown flag similar to nettest. It would make it easier to extend current tests instead of rewriting them to use nettest |
/lgtm |
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
ddb7f10
to
ff997ae
Compare
^ sorry, ended up pushing a minor fix |
is ok now? |
/lgtm |
/assign @claudiubelu |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
Signed-off-by: Andrew Sy Kim andrewsy@google.com
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds a --delay-shutdown flag to the net and netexec subcommand in the agnhost test image used in e2e tests. This will be specifically useful for tests in #108691, where we need a webserver that receives SIGTERM but continues to serve traffic.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: