2022-09-22: Remove corrupted series from Thanos
Production Change
Change Summary
For https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/16424
After #7751 (closed) we had corrupted data in Thanos that is reflected in our availability number and error budgets for stage groups.
Using a thanos tool we're going to remove the corrupted data for the series affecting SLAs and error budgets for the timeframe of 2022-09-15 22:00:00 UTC to 2022-09-16 01:36:00 UTC
Config file for the deletion: deletion-config.yml
Change Details
- Services Impacted - ServiceThanos
-
Change Technician -
@igorwwwwwwwwwwwwwwwwwwww - Change Reviewer - @reprazent
- Time tracking - 30m
- Downtime Component - None
Detailed steps for the change
Change Steps - steps to take to execute the change
Estimated Time to Complete (mins) - 30m
-
Set label changein-progress /label ~change::in-progress -
Backup blocks gsutil rsync -r gs://gitlab-ops-prometheus/01GD4Z87286SVT6V06FVDNCTV0 gs://gitlab-ops-prometheus/01GD4Z87286SVT6V06FVDNCTV0.bak gsutil rsync -r gs://gitlab-ops-prometheus/01GD4ZEEGZ074E4FA84YT877KF gs://gitlab-ops-prometheus/01GD4ZEEGZ074E4FA84YT877KF.bak gsutil rsync -r gs://gitlab-ops-prometheus/01GD4ZN8Q4KSJ75HTBJ0VNY7RB gs://gitlab-ops-prometheus/01GD4ZN8Q4KSJ75HTBJ0VNY7RB.bak gsutil rsync -r gs://gitlab-ops-prometheus/01GD4ZXHHWMGXTGPE8CSKF1F2F gs://gitlab-ops-prometheus/01GD4ZXHHWMGXTGPE8CSKF1F2F.bak -
Create objstore.yml:type: GCS config: bucket: gitlab-ops-prometheus -
Dry-run thanos tools bucket rewrite --rewrite.to-delete-config-file=deletion-config.yml --objstore.config-file=objstore.yml --id=01GD4Z87286SVT6V06FVDNCTV0 --id=01GD4ZEEGZ074E4FA84YT877KF --id=01GD4ZN8Q4KSJ75HTBJ0VNY7RB --id=01GD4ZXHHWMGXTGPE8CSKF1F2F --rewrite.add-change-log --dry-run -
Proper run thanos tools bucket rewrite --rewrite.to-delete-config-file=deletion-config.yml --objstore.config-file=objstore.yml --id=01GD4Z87286SVT6V06FVDNCTV0 --id=01GD4ZEEGZ074E4FA84YT877KF --id=01GD4ZN8Q4KSJ75HTBJ0VNY7RB --id=01GD4ZXHHWMGXTGPE8CSKF1F2F --rewrite.add-change-log --no-dry-run -
Set label changecomplete /label ~change::complete
Rollback
Rollback steps - steps to be taken in the event of a need to rollback this change
Restore blocks from backup:
gsutil rsync -r gs://gitlab-ops-prometheus/01GD4ZN8Q4KSJ75HTBJ0VNY7RB.bak gs://gitlab-ops-prometheus/01GD4ZN8Q4KSJ75HTBJ0VNY7RB
gsutil rsync -r gs://gitlab-ops-prometheus/01GD4ZEEGZ074E4FA84YT877KF.bak gs://gitlab-ops-prometheus/01GD4ZEEGZ074E4FA84YT877KF
gsutil rsync -r gs://gitlab-ops-prometheus/01GD4Z87286SVT6V06FVDNCTV0.bak gs://gitlab-ops-prometheus/01GD4Z87286SVT6V06FVDNCTV0
gsutil rsync -r gs://gitlab-ops-prometheus/01GD4ZXHHWMGXTGPE8CSKF1F2F.bak gs://gitlab-ops-prometheus/01GD4ZXHHWMGXTGPE8CSKF1F2F
Monitoring
Key metrics to observe
Change Reviewer checklist
-
Check if the following applies: - The scheduled day and time of execution of the change is appropriate.
- The change plan is technically accurate.
- The change plan includes estimated timing values based on previous testing.
- The change plan includes a viable rollback plan.
- The specified metrics/monitoring dashboards provide sufficient visibility for the change.
-
Check if the following applies: - The complexity of the plan is appropriate for the corresponding risk of the change. (i.e. the plan contains clear details).
- The change plan includes success measures for all steps/milestones during the execution.
- The change adequately minimizes risk within the environment/service.
- The performance implications of executing the change are well-understood and documented.
- The specified metrics/monitoring dashboards provide sufficient visibility for the change.
- If not, is it possible (or necessary) to make changes to observability platforms for added visibility?
- The change has a primary and secondary SRE with knowledge of the details available during the change window.
- The labels blocks deployments and/or blocks feature-flags are applied as necessary
Change Technician checklist
-
Check if all items below are complete: - The change plan is technically accurate.
- This Change Issue is linked to the appropriate Issue and/or Epic
- Change has been tested in staging and results noted in a comment on this issue.
- A dry-run has been conducted and results noted in a comment on this issue.
- The change execution window respects the Production Change Lock periods.
- For C1 and C2 change issues, the change event is added to the GitLab Production calendar.
- For C1 and C2 change issues, the SRE on-call has been informed prior to change being rolled out. (In #production channel, mention
@sre-oncalland this issue and await their acknowledgement.) - For C1 and C2 change issues, the SRE on-call provided approval with the eoc_approved label on the issue.
- For C1 and C2 change issues, the Infrastructure Manager provided approval with the manager_approved label on the issue.
- Release managers have been informed (If needed! Cases include DB change) prior to change being rolled out. (In #production channel, mention
@release-managersand this issue and await their acknowledgment.) - There are currently no active incidents that are severity1 or severity2
- If the change involves doing maintenance on a database host, an appropriate silence targeting the host(s) should be added for the duration of the change.
Edited by Igor