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

Loki: Add a prepare-shutdown endpoint #8786

Merged
merged 7 commits into from
Mar 17, 2023
Merged

Conversation

DylanGuedes
Copy link
Contributor

@DylanGuedes DylanGuedes commented Mar 13, 2023

What this PR does / why we need it:
Add a new /ingester/prepare_shutdown endpoint. This new endpoint configures the ingester to release resources on the next SIGTERM.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 13, 2023
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Mar 13, 2023
@DylanGuedes DylanGuedes marked this pull request as ready for review March 13, 2023 19:05
@DylanGuedes DylanGuedes requested review from JStickler and a team as code owners March 13, 2023 19:05
Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[docs team] Couple of small tweaks requested.

POST /ingester/prepare_shutdown
```

`/ingester/prepare_shutdown` will prepare the ingester to release resources on the next SIGTERM,
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like we should define SIGTERM here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SIGTERM is a type of signal that a process can receive and is supported by all Unix-based operating systems. Do you think saying SIGTERM signal is enough here?

Copy link
Contributor

Choose a reason for hiding this comment

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

LOL, and I have just exposed my UNIX ignorance. But it's also possible that we might have customers in Windows-only environments who could use the information? What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, with "could use the information" do you mean the definition of SIGTERM? If so: personally, I feel like this isn't the appropriate place for explaining a concept like SIGTERM, although saying "SIGTERM signal" indeed looked better than just saying "SIGTERM".

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, let's go with "SIGTERM signal" then.

docs/sources/api/_index.md Outdated Show resolved Hide resolved
docs/sources/api/_index.md Outdated Show resolved Hide resolved
DylanGuedes and others added 2 commits March 13, 2023 17:41
Co-authored-by: J Stickler <julie.stickler@grafana.com>
@MasslessParticle MasslessParticle merged commit 53b9a35 into main Mar 17, 2023
@MasslessParticle MasslessParticle deleted the prepare-shutdown branch March 17, 2023 21:08
@@ -372,6 +372,8 @@ type Loki struct {
deleteClientMetrics *deletion.DeleteRequestClientMetrics

HTTPAuthMiddleware middleware.Interface

ingesterRelease *atomic.Bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the late review but is this variable set anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol looks like something I was using in an older implementation but forgot to clean, thanks for catching it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep I was using it in a former implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants