-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(sidecar): Allow sidecar to not crash on startup if objstore is not available #7708
base: main
Are you sure you want to change the base?
Conversation
Do all object storage clients attempt to create the bucket? Edit: I spot checked the s3 provider and it doesnt create a bucket - so this would likely break that, right? As in - if we start with S3 we will never create the bucket and human interaction is needed. FWIW: we have a sidecar that creates the bucket if it doesnt exist. |
So, in objstore
The PR moved the call to |
New bucket creates a new implementation of the objstore bucket interface - that does not mean that they create a bucket in object storage i think! |
6ec7fdc
to
10349bf
Compare
d5b1fa3
to
5f774ea
Compare
Note: pull request updated to make this new behavior disabled by default and enabled only via |
This commit allows sidecar to continue to serve prometheus read path if objstore is not available at startup. Bucket creation will be attempted again on next upload. This option is disabled by default and can be enabled by passing argument "--shipper.retry-init". This commit also brings a new metric to alert in case of bucket initialization crash: thanos_sidecar_shipper_up Signed-off-by: Amaury Decrême <amaury.decreme@gmail.com>
5f774ea
to
42b6661
Compare
This PR adds
--shipper.retry-init
option to sidecar to allow it to continue to serve prometheus read path if shipper init is failing at startup (eg: network issue on objstore).On each upload, if shipper is not initialized, reinitialization will be attempted again.
This PR also brings a new metric
thanos_sidecar_shipper_up
to alert in case of shipper issue.Changes
--shipper.retry-init
option to allow retrying shipper init on each uploadthanos_sidecar_shipper_up
metric.bin
to.gitignore
Verification
I used thanos-docker-compose.
I then configured a bogus objstore.config to force crash.
1. Current situation with broken objstore at startup
Then sidecar crashes.
2. With
--shipper.retry-init
with broken objstoreSidecar doesn't crash.
Metric: