Skip to content

feat: add terminationGracePeriodSeconds to provisioner chart #9048

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

Merged
merged 5 commits into from
Aug 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove hardcoded 1 minute graceful timeout
Signed-off-by: Spike Curtis <spike@coder.com>
  • Loading branch information
spikecurtis committed Aug 11, 2023
commit 94352a66ac5eaa84c62a53062a6de8baaca17b2f
4 changes: 1 addition & 3 deletions enterprise/cli/provisionerdaemons.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ func (r *RootCmd) provisionerDaemonStart() *clibase.Cmd {
cliui.Errorf(inv.Stderr, "Unexpected error, shutting down server: %s\n", exitErr)
}

shutdown, shutdownCancel := context.WithTimeout(ctx, time.Minute)
defer shutdownCancel()
err = srv.Shutdown(shutdown)
err = srv.Shutdown(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

What effect will this have outside of a Kubernetes environment if we have a build in progress that just hangs indefinitely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will do what we describe earlier in this file:

"Interrupt caught, gracefully exiting. Use ctrl+\\ to force quit", that is, we'll wait indefinitely until we get a more aggressive signal like SIGQUIT (ctrl + \) or SIGKILL.

if err != nil {
return xerrors.Errorf("shutdown: %w", err)
}
Expand Down