Allow machineid.AutoUpdateVersionReporter to shut down correctly#60219
Merged
Allow machineid.AutoUpdateVersionReporter to shut down correctly#60219
machineid.AutoUpdateVersionReporter to shut down correctly#60219Conversation
Fixes an issue where, because we were starting the leader election routine inside `auth.NewServer`, nothing was waiting for it to shut down correctly, and we were failing to release the semaphore. There wasn't a huge user-facing impact (as the semaphore lease would eventually expire) but it leads to a confusing error message in the logs and delays things unnecessarily.
87d0f4c to
5f751ec
Compare
zmb3
approved these changes
Oct 14, 2025
marcoandredinis
approved these changes
Oct 14, 2025
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Contributor
boxofrad
added a commit
that referenced
this pull request
Oct 15, 2025
boxofrad
added a commit
that referenced
this pull request
Oct 15, 2025
boxofrad
added a commit
that referenced
this pull request
Oct 15, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 15, 2025
* MWI: Generate `AutoUpdateBotInstanceReport` resource (#59738) * MWI: Add `tctl` get and delete mappings for `AutoUpdateBotInstanceReport` (#60017) * MWI: Add `teleport_bot_instances` metric (#59774) * MWI: Log on `AutoUpdateBotInstanceReport` generation failure (#60191) * Fix passing lock by value * Allow `machineid.AutoUpdateVersionReporter` to shut down correctly (#60219)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 15, 2025
* MWI: Generate `AutoUpdateBotInstanceReport` resource (#59738) * MWI: Add `tctl` get and delete mappings for `AutoUpdateBotInstanceReport` (#60017) * MWI: Add `teleport_bot_instances` metric (#59774) * MWI: Log on `AutoUpdateBotInstanceReport` generation failure (#60191) * Allow `machineid.AutoUpdateVersionReporter` to shut down correctly (#60219)
mmcallister
pushed a commit
that referenced
this pull request
Nov 6, 2025
…60219) * Allow `machineid.AutoUpdateVersionReporter` to shut down correctly Fixes an issue where, because we were starting the leader election routine inside `auth.NewServer`, nothing was waiting for it to shut down correctly, and we were failing to release the semaphore. There wasn't a huge user-facing impact (as the semaphore lease would eventually expire) but it leads to a confusing error message in the logs and delays things unnecessarily. * Use `Clock.Since` instead of manually subtracting time Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com> --------- Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
rhammonds-teleport
pushed a commit
that referenced
this pull request
Nov 6, 2025
…60219) * Allow `machineid.AutoUpdateVersionReporter` to shut down correctly Fixes an issue where, because we were starting the leader election routine inside `auth.NewServer`, nothing was waiting for it to shut down correctly, and we were failing to release the semaphore. There wasn't a huge user-facing impact (as the semaphore lease would eventually expire) but it leads to a confusing error message in the logs and delays things unnecessarily. * Use `Clock.Since` instead of manually subtracting time Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com> --------- Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
mmcallister
pushed a commit
that referenced
this pull request
Nov 19, 2025
…60219) * Allow `machineid.AutoUpdateVersionReporter` to shut down correctly Fixes an issue where, because we were starting the leader election routine inside `auth.NewServer`, nothing was waiting for it to shut down correctly, and we were failing to release the semaphore. There wasn't a huge user-facing impact (as the semaphore lease would eventually expire) but it leads to a confusing error message in the logs and delays things unnecessarily. * Use `Clock.Since` instead of manually subtracting time Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com> --------- Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
mmcallister
pushed a commit
that referenced
this pull request
Nov 20, 2025
…60219) * Allow `machineid.AutoUpdateVersionReporter` to shut down correctly Fixes an issue where, because we were starting the leader election routine inside `auth.NewServer`, nothing was waiting for it to shut down correctly, and we were failing to release the semaphore. There wasn't a huge user-facing impact (as the semaphore lease would eventually expire) but it leads to a confusing error message in the logs and delays things unnecessarily. * Use `Clock.Since` instead of manually subtracting time Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com> --------- Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes an issue where, because we were starting the leader election routine inside
auth.NewServer, nothing was waiting for it to shut down correctly, and we were failing to release the semaphore.There wasn't a huge user-facing impact (as the semaphore lease would eventually expire) but it leads to a confusing error message in the logs and delays things unnecessarily.
Credit to @marcoandredinis for finding it.