Skip to content
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

Ingester shutdown marker improvements #4985

Merged
merged 7 commits into from
May 15, 2023
Merged

Conversation

56quarters
Copy link
Contributor

@56quarters 56quarters commented May 11, 2023

What this PR does

This PR improves the way shutdown markers for ingesters work. Namely it:

  • Removes the shutdown marker while shutting down. The volumes used by ingesters are reused if an ingester is stopped (scaled down) but then later started again with the same name. Removing the marker during shutdown prevents the ingester from unregistering and flushing the next time it is stopped after having already performed its work for "permanently" shutting down.
  • Prevents changes to the shutdown marker while the ingester is not running. This prevents the rollout-operator from calling the prepare-shutdown endpoint again while the ingester is already in the process of shutting down and about to remove the shutdown marker as noted previously.

Which issue(s) this PR fixes or relates to

N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

This PR improves the way shutdown markers for ingesters work. Namely it:

* Removes the shutdown marker while shutting down. The volumes used by ingesters
  are reused if an ingester is stopped (scaled down) but then later started again
  with the same name. Removing the marker during shutdown prevents the ingester
  from unregistering and flushing the next time it is stopped after having already
  performed its work for "permanently" shutting down.
* Prevents changes to the shutdown marker while the ingester is not running. This
  prevents the rollout-operator from calling the `prepare-shutdown` endpoint again
  while the ingester is already in the process of shutting down and about to remove
  the shutdown marker as noted previously.

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
@56quarters 56quarters marked this pull request as ready for review May 11, 2023 17:19
@56quarters 56quarters requested a review from a team as a code owner May 11, 2023 17:19
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Can you fix it for store-gateway too, please?

…oint

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Copy link
Member

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/ingester/ingester.go Show resolved Hide resolved
pkg/ingester/ingester.go Show resolved Hide resolved
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
@56quarters 56quarters merged commit 77c8cab into main May 15, 2023
19 checks passed
@56quarters 56quarters deleted the 56quarters/ingester-shutdown branch May 15, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants