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

Make /ingester/shutdown endpoint work with GET #11431

Closed
andresperezl opened this issue Dec 11, 2023 · 1 comment · Fixed by #11477
Closed

Make /ingester/shutdown endpoint work with GET #11431

andresperezl opened this issue Dec 11, 2023 · 1 comment · Fixed by #11477
Labels
component/api type/feature Something new we should do

Comments

@andresperezl
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently the /ingester/shutdown endpoint only works with the POST method, but the kuberentes lifecycle httpGet (as the name implies) sends a GET requests, which doesn't do anything when triggered against that pod.

Describe the solution you'd like
The /ingester/shutdown endpoint should work with a HTTP GET request

Describe alternatives you've considered
The work around is using the exec to use a tool like wget or curl to send a POST request to the endpoint.

Additional context
In the loki chart is using the httpGet as well which is basically a no-op: https://github.com/grafana/loki/blob/main/production/helm/loki/templates/write/statefulset-write.yaml#L121

https://grafana.com/docs/loki/latest/operations/storage/wal/#kubernetes-hacking
https://grafana.com/docs/loki/latest/reference/api/#flush-in-memory-chunks-and-shut-down

@splitice
Copy link
Contributor

@andresperezl you beat me to this issue by less than a day!

I was wondering why the kubernetes call wasnt working after flush on shutdown was removed from the ingester component :(

MichelHollands added a commit that referenced this issue Dec 14, 2023
**Which issue(s) this PR fixes**:
Fixes #11431 

**Checklist**
- [X] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [X] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e)
- [ ] If the change is deprecating or removing a configuration option,
update the `deprecated-config.yaml` and `deleted-config.yaml` files
respectively in the `tools/deprecated-config-checker` directory.
[Example
PR](0d4416a)

---------

Signed-off-by: Michel Hollands <[email protected]>
rhnasc pushed a commit to inloco/loki that referenced this issue Apr 12, 2024
**Which issue(s) this PR fixes**:
Fixes grafana#11431 

**Checklist**
- [X] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [X] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](grafana@d10549e)
- [ ] If the change is deprecating or removing a configuration option,
update the `deprecated-config.yaml` and `deleted-config.yaml` files
respectively in the `tools/deprecated-config-checker` directory.
[Example
PR](grafana@0d4416a)

---------

Signed-off-by: Michel Hollands <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api type/feature Something new we should do
Projects
None yet
3 participants