Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: wait for provisioner daemon jobs to finish after sigterm#14466

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedAug 28, 2024
edited
Loading

Fixes#14433.

The function for shutting down a provisioner daemon has the signature:

func (p*Server)Shutdown(ctx context.Context,cancelActiveJobbool)error

Thecoder server code for handling graceful provisioner shutdowns was correct:

err:=shutdownWithTimeout(func(ctx context.Context)error {// We only want to cancel active jobs if we aren't exiting gracefully.returnprovisionerDaemon.Shutdown(ctx,!waitForProvisionerJobs)},timeout)

Whilst the matching code for graceful shutdowns of independent provisioner daemons (coder provisionerd start) was not:

err=srv.Shutdown(ctx,waitForProvisionerJobs)

This wasn't caught by tests as I don't believe we have any clitests forprovisionerd. The existing tests call the shutdown function directly.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@ethanndickson and the rest of your teammates onGraphiteGraphite

@ethanndicksonethanndickson marked this pull request as ready for reviewAugust 28, 2024 10:13
Copy link

@cdr-botcdr-botbot left a comment

Choose a reason for hiding this comment

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

This PR is a hotfix and has been automatically approved.

  • ✅ Base is main or release branch
  • ✅ Has hotfix label
  • ✅ Head is from coder/coder
  • ✅ Less than 100 lines

@ethanndicksonethanndickson merged commitc597c92 intomainAug 28, 2024
41 checks passed
@ethanndicksonethanndickson deleted the 08-28-fix_wait_for_provisioner_daemon_jobs_to_finish_after_sigterm branchAugust 28, 2024 10:16
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 28, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@cdr-botcdr-bot[bot]cdr-bot[bot] approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

"Graceful" shutdown with SIGTERM appears to interrupt Teraform provider
1 participant
@ethanndickson

[8]ページ先頭

©2009-2025 Movatter.jp