Skip to content

Commit e3b21d3

Browse files
alanprotaughralvinlin123
authored
Remove support for chunks storage entirely: Take 2 (#4812)
* Fix updateCachedShippedBlocks - new thanos Signed-off-by: Alan Protasio <[email protected]> * Remove support for chunks ingestion Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove blocksconvert Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove most all of chunks storage Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove old legacy object store client and uses Signed-off-by: Andrew Bloomgarden <[email protected]> * Start removing chunks docs Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove HTTP APIs that were chunks-only Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove more chunks docs Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove deprecated and chunks configs Signed-off-by: Andrew Bloomgarden <[email protected]> * Draft changelog Signed-off-by: Andrew Bloomgarden <[email protected]> * Fix up integration tests Signed-off-by: Andrew Bloomgarden <[email protected]> * Clean up lint warnings Signed-off-by: Andrew Bloomgarden <[email protected]> * go mod tidy && go mod vendor Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove chunks storage from bug report template Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove most chunk encoding/decoding code Signed-off-by: Andrew Bloomgarden <[email protected]> * Remove unused cardinality limit flag Signed-off-by: Andrew Bloomgarden <[email protected]> * Document removed flags in the CHANGELOG Signed-off-by: Andrew Bloomgarden <[email protected]> * rebasing Signed-off-by: Alan Protasio <[email protected]> * Fix Ingester Proto Signed-off-by: Alan Protasio <[email protected]> * Removing chunk storage config Signed-off-by: Alan Protasio <[email protected]> * Removing tsdb_test.go Signed-off-by: Alan Protasio <[email protected]> * go mod Signed-off-by: Alan Protasio <[email protected]> * Removing cassandra referenves from the integ tests Signed-off-by: Alan Protasio <[email protected]> * Keep MIgrating Storage Documentation Signed-off-by: Alan Protasio <[email protected]> * Removing dangling chunks config Signed-off-by: Alan Protasio <[email protected]> * Update Changelog Signed-off-by: Alan Protasio <[email protected]> * Removing blocks convert from gitignore and makfile local Signed-off-by: Alan Protasio <[email protected]> * Remove dead code Signed-off-by: Alan Protasio <[email protected]> Signed-off-by: Alan Protasio <[email protected]> Signed-off-by: Andrew Bloomgarden <[email protected]> Co-authored-by: Andrew Bloomgarden <[email protected]> Co-authored-by: Alvin Lin <[email protected]>
1 parent 362e902 commit e3b21d3

File tree

568 files changed

+1020
-214693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

568 files changed

+1020
-214693
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,5 @@ A clear and concise description of what you expected to happen.
2222
- Infrastructure: [e.g., Kubernetes, bare-metal, laptop]
2323
- Deployment tool: [e.g., helm, jsonnet]
2424

25-
**Storage Engine**
26-
- [ ] Blocks
27-
- [ ] Chunks
28-
2925
**Additional Context**
3026
<!-- Additional relevant info which can help us debug this issue easily like Logs, Configuration etc. -->

.github/workflows/test-build-deploy.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ jobs:
3535
runs-on: ubuntu-20.04
3636
container:
3737
image: quay.io/cortexproject/build-image:update-hugo-0.94.x-96d1d7cdd
38-
services:
39-
cassandra:
40-
image: cassandra:3.11
41-
env:
42-
JVM_OPTS: "-Xms1024M -Xmx1024M"
43-
ports:
44-
- 9042:9042
4538
steps:
4639
- name: Checkout Repo
4740
uses: actions/checkout@v2
@@ -50,7 +43,7 @@ jobs:
5043
mkdir -p /go/src/github.com/cortexproject/cortex
5144
ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/cortex
5245
- name: Run Tests
53-
run: CASSANDRA_TEST_ADDRESSES=cassandra:9042 make BUILD_IN_CONTAINER=false test
46+
run: make BUILD_IN_CONTAINER=false test
5447

5548
build:
5649
runs-on: ubuntu-20.04
@@ -138,7 +131,6 @@ jobs:
138131
docker pull quay.io/cortexproject/cortex:v1.9.0
139132
docker pull quay.io/cortexproject/cortex:v1.10.0
140133
docker pull shopify/bigtable-emulator:0.1.0
141-
docker pull rinscy/cassandra:3.11.0
142134
docker pull memcached:1.6.1
143135
docker pull bouncestorage/swift-aio:55ba4331
144136
- name: Integration Tests

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cmd/test-exporter/test-exporter
22
cmd/cortex/cortex
33
cmd/query-tee/query-tee
4-
cmd/blocksconvert/blocksconvert
54
cmd/thanosconvert/thanosconvert
65
.uptodate
76
.pkg

CHANGELOG.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,49 @@
11
# Changelog
22

33
## master / unreleased
4+
**This release removes support for chunks storage. See below for more.**
5+
* [CHANGE] Remove support for chunks storage entirely. If you are using chunks storage on a previous version, you must [migrate your data](https://github.com/cortexproject/cortex/blob/v1.11.1/docs/blocks-storage/migrate-from-chunks-to-blocks.md) on version 1.12 or earlier. Before upgrading to this release, you should also remove any deprecated chunks-related configuration, as this release will no longer accept that. The following flags are gone:
6+
- `-dynamodb.*`
7+
- `-metrics.*`
8+
- `-s3.*`
9+
- `-azure.*`
10+
- `-bigtable.*`
11+
- `-gcs.*`
12+
- `-cassandra.*`
13+
- `-boltdb.*`
14+
- `-local.*`
15+
- some `-ingester` flags:
16+
- `-ingester.wal-enabled`
17+
- `-ingester.checkpoint-enabled`
18+
- `-ingester.recover-from-wal`
19+
- `-ingester.wal-dir`
20+
- `-ingester.checkpoint-duration`
21+
- `-ingester.flush-on-shutdown-with-wal-enabled`
22+
- `-ingester.max-transfer-retries`
23+
- `-ingester.max-samples-per-query`
24+
- `-ingester.min-chunk-length`
25+
- `-ingester.flush-period`
26+
- `-ingester.retain-period`
27+
- `-ingester.max-chunk-idle`
28+
- `-ingester.max-stale-chunk-idle`
29+
- `-ingester.flush-op-timeout`
30+
- `-ingester.max-chunk-age`
31+
- `-ingester.chunk-age-jitter`
32+
- `-ingester.concurrent-flushes`
33+
- `-ingester.spread-flushes`
34+
- `-store.*` except `-store.engine` and `-store.max-query-length`
35+
- `-store.query-chunk-limit` was deprecated and replaced by `-querier.max-fetched-chunks-per-query`
36+
- `-deletes.*`
37+
- `-grpc-store.*`
38+
- `-flusher.wal-dir`, `-flusher.concurrent-flushes`, `-flusher.flush-op-timeout`
39+
* [CHANGE] Remove support for alertmanager and ruler legacy store configuration. Before upgrading, you need to convert your configuration to use the `alertmanager-storage` and `ruler-storage` configuration on the version that you're already running, then upgrade.
440
* [ENHANCEMENT] Querier/Ruler: Retry store-gateway in case of unexpected failure, instead of failing the query. #4532
541
* [ENHANCEMENT] Ring: DoBatch prioritize 4xx errors when failing. #4783
642
* [FEATURE] Compactor: Added `-compactor.block-files-concurrency` allowing to configure number of go routines for download/upload block files during compaction. #4784
743
* [FEATURE] Compactor: Added -compactor.blocks-fetch-concurrency` allowing to configure number of go routines for blocks during compaction. #4787
844
* [FEATURE] Compactor: Added configurations for Azure MSI in blocks-storage, ruler-storage and alertmanager-storage. #4818
945
* [BUGFIX] Memberlist: Add join with no retrying when starting service. #4804
1046

11-
12-
1347
## 1.13.0 2022-07-14
1448

1549
* [CHANGE] Changed default for `-ingester.min-ready-duration` from 1 minute to 15 seconds. #4539

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,12 @@ pkg/frontend/v1/frontendv1pb/frontend.pb.go: pkg/frontend/v1/frontendv1pb/fronte
9696
pkg/frontend/v2/frontendv2pb/frontend.pb.go: pkg/frontend/v2/frontendv2pb/frontend.proto
9797
pkg/querier/queryrange/queryrange.pb.go: pkg/querier/queryrange/queryrange.proto
9898
pkg/querier/stats/stats.pb.go: pkg/querier/stats/stats.proto
99-
pkg/chunk/storage/caching_index_client.pb.go: pkg/chunk/storage/caching_index_client.proto
10099
pkg/distributor/ha_tracker.pb.go: pkg/distributor/ha_tracker.proto
101100
pkg/ruler/rulespb/rules.pb.go: pkg/ruler/rulespb/rules.proto
102101
pkg/ruler/ruler.pb.go: pkg/ruler/ruler.proto
103102
pkg/ring/kv/memberlist/kv.pb.go: pkg/ring/kv/memberlist/kv.proto
104103
pkg/scheduler/schedulerpb/scheduler.pb.go: pkg/scheduler/schedulerpb/scheduler.proto
105104
pkg/storegateway/storegatewaypb/gateway.pb.go: pkg/storegateway/storegatewaypb/gateway.proto
106-
pkg/chunk/grpc/grpc.pb.go: pkg/chunk/grpc/grpc.proto
107-
tools/blocksconvert/scheduler.pb.go: tools/blocksconvert/scheduler.proto
108105
pkg/alertmanager/alertmanagerpb/alertmanager.pb.go: pkg/alertmanager/alertmanagerpb/alertmanager.proto
109106
pkg/alertmanager/alertspb/alerts.pb.go: pkg/alertmanager/alertspb/alerts.proto
110107

@@ -359,7 +356,7 @@ dist/$(UPTODATE)-packages: dist $(wildcard packaging/deb/**) $(wildcard packagin
359356
--before-remove packaging/deb/control/prerm \
360357
--package dist/cortex-$(VERSION)_$$arch.deb \
361358
dist/cortex-linux-$$arch=/usr/local/bin/cortex \
362-
docs/chunks-storage/single-process-config.yaml=/etc/cortex/single-process-config.yaml \
359+
docs/configuration/single-process-config-blocks.yaml=/etc/cortex/single-process-config.yaml \
363360
packaging/deb/default/cortex=/etc/default/cortex \
364361
packaging/deb/systemd/cortex.service=/etc/systemd/system/cortex.service; \
365362
$(FPM_OPTS) -t rpm \
@@ -368,7 +365,7 @@ dist/$(UPTODATE)-packages: dist $(wildcard packaging/deb/**) $(wildcard packagin
368365
--before-remove packaging/rpm/control/preun \
369366
--package dist/cortex-$(VERSION)_$$arch.rpm \
370367
dist/cortex-linux-$$arch=/usr/local/bin/cortex \
371-
docs/chunks-storage/single-process-config.yaml=/etc/cortex/single-process-config.yaml \
368+
docs/configuration/single-process-config-blocks.yaml=/etc/cortex/single-process-config.yaml \
372369
packaging/rpm/sysconfig/cortex=/etc/sysconfig/cortex \
373370
packaging/rpm/systemd/cortex.service=/etc/systemd/system/cortex.service; \
374371
done

Makefile.local.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@
33
BUILD_IMAGE ?= quay.io/cortexproject/build-image
44
IMAGE_PREFIX ?= custom-prefix/
55

6-
blocksconvert-push: cmd/blocksconvert/.uptodate
7-
docker push $(IMAGE_PREFIX)blocksconvert:$(IMAGE_TAG)
8-
96
cortex-push: cmd/cortex/.uptodate
107
docker push $(IMAGE_PREFIX)cortex:$(IMAGE_TAG)

cmd/blocksconvert/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

cmd/blocksconvert/main.go

Lines changed: 0 additions & 107 deletions
This file was deleted.

docs/api/_index.md

Lines changed: 6 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For the sake of clarity, in this document we have grouped API endpoints by servi
2828
| [Remote write](#remote-write) | Distributor | `POST /api/v1/push` |
2929
| [Tenants stats](#tenants-stats) | Distributor | `GET /distributor/all_user_stats` |
3030
| [HA tracker status](#ha-tracker-status) | Distributor | `GET /distributor/ha_tracker` |
31-
| [Flush chunks / blocks](#flush-chunks--blocks) | Ingester | `GET,POST /ingester/flush` |
31+
| [Flush blocks](#flush-blocks) | Ingester | `GET,POST /ingester/flush` |
3232
| [Shutdown](#shutdown) | Ingester | `GET,POST /ingester/shutdown` |
3333
| [Ingesters ring status](#ingesters-ring-status) | Ingester | `GET /ingester/ring` |
3434
| [Instant query](#instant-query) | Querier, Query-frontend | `GET,POST <prometheus-http-prefix>/api/v1/query` |
@@ -40,7 +40,6 @@ For the sake of clarity, in this document we have grouped API endpoints by servi
4040
| [Get metric metadata](#get-metric-metadata) | Querier, Query-frontend | `GET <prometheus-http-prefix>/api/v1/metadata` |
4141
| [Remote read](#remote-read) | Querier, Query-frontend | `POST <prometheus-http-prefix>/api/v1/read` |
4242
| [Get tenant ingestion stats](#get-tenant-ingestion-stats) | Querier | `GET /api/v1/user_stats` |
43-
| [Get tenant chunks](#get-tenant-chunks) | Querier | `GET /api/v1/chunks` |
4443
| [Ruler ring status](#ruler-ring-status) | Ruler | `GET /ruler/ring` |
4544
| [Ruler rules ](#ruler-rule-groups) | Ruler | `GET /ruler/rule_groups` |
4645
| [List rules](#list-rules) | Ruler | `GET <prometheus-http-prefix>/api/v1/rules` |
@@ -60,9 +59,6 @@ For the sake of clarity, in this document we have grouped API endpoints by servi
6059
| [Get Alertmanager configuration](#get-alertmanager-configuration) | Alertmanager | `GET /api/v1/alerts` |
6160
| [Set Alertmanager configuration](#set-alertmanager-configuration) | Alertmanager | `POST /api/v1/alerts` |
6261
| [Delete Alertmanager configuration](#delete-alertmanager-configuration) | Alertmanager | `DELETE /api/v1/alerts` |
63-
| [Delete series](#delete-series) | Purger | `PUT,POST <prometheus-http-prefix>/api/v1/admin/tsdb/delete_series` |
64-
| [List delete requests](#list-delete-requests) | Purger | `GET <prometheus-http-prefix>/api/v1/admin/tsdb/delete_series` |
65-
| [Cancel delete request](#cancel-delete-request) | Purger | `PUT,POST <prometheus-http-prefix>/api/v1/admin/tsdb/cancel_delete_request` |
6662
| [Tenant delete request](#tenant-delete-request) | Purger | `POST /purger/delete_tenant` |
6763
| [Tenant delete status](#tenant-delete-status) | Purger | `GET /purger/delete_tenant_status` |
6864
| [Store-gateway ring status](#store-gateway-ring-status) | Store-gateway | `GET /store-gateway/ring` |
@@ -247,7 +243,7 @@ Displays a web page with the current status of the HA tracker, including the ele
247243

248244
## Ingester
249245

250-
### Flush chunks / blocks
246+
### Flush blocks
251247

252248
```
253249
GET,POST /ingester/flush
@@ -256,11 +252,11 @@ GET,POST /ingester/flush
256252
GET,POST /flush
257253
```
258254

259-
Triggers a flush of the in-memory time series data (chunks or blocks) to the long-term storage. This endpoint triggers the flush also when `-ingester.flush-on-shutdown-with-wal-enabled` or `-blocks-storage.tsdb.flush-blocks-on-shutdown` are disabled.
255+
Triggers a flush of the in-memory time series data to the long-term storage. This endpoint triggers the flush also when `-ingester.flush-on-shutdown-with-wal-enabled` or `-blocks-storage.tsdb.flush-blocks-on-shutdown` are disabled.
260256

261-
When using blocks storage, this endpoint accepts `tenant` parameter to specify tenant whose blocks are compacted and shipped. This parameter may be specified multiple times to select more tenants. If no tenant is specified, all tenants are flushed.
257+
This endpoint accepts `tenant` parameter to specify tenant whose blocks are compacted and shipped. This parameter may be specified multiple times to select more tenants. If no tenant is specified, all tenants are flushed.
262258

263-
Flush endpoint now also accepts `wait=true` parameter, which makes the call synchronous – it will only return after flushing has finished. Note that returned status code does not reflect the result of flush operation. This parameter is only available when using blocks storage.
259+
Flush endpoint now also accepts `wait=true` parameter, which makes the call synchronous – it will only return after flushing has finished. Note that returned status code does not reflect the result of flush operation.
264260

265261
### Shutdown
266262

@@ -427,25 +423,6 @@ Returns realtime ingestion rate, for the authenticated tenant, in `JSON` format.
427423

428424
_Requires [authentication](#authentication)._
429425

430-
### Get tenant chunks
431-
432-
```
433-
GET /api/v1/chunks
434-
435-
# Legacy
436-
GET <legacy-http-prefix>/chunks
437-
```
438-
439-
Fetch a compressed tar of all the chunks containing samples for the given time range and label matchers. This endpoint is supported only by the **chunks storage**, requires `-querier.ingester-streaming=true` and should **not be exposed to users** but just used for debugging purposes.
440-
441-
| URL query parameter | Description |
442-
| ------------------- | ----------- |
443-
| `start` | Start timestamp, in RFC3339 format or unix epoch. |
444-
| `end` | End timestamp, in RFC3339 format or unix epoch. |
445-
| `matcher` | Label matcher that selects the series for which chunks should be fetched. |
446-
447-
_Requires [authentication](#authentication)._
448-
449426
## Ruler
450427

451428
The ruler API endpoints require to configure a backend object storage to store the recording rules and alerts. The ruler API uses the concept of a "namespace" when creating rule groups. This is a stand in for the name of the rule file in Prometheus and rule groups must be named uniquely within a namespace.
@@ -810,52 +787,7 @@ _Requires [authentication](#authentication)._
810787

811788
## Purger
812789

813-
The Purger service provides APIs for requesting deletion of series in chunks storage and managing delete requests. For more information about it, please read the [Delete series Guide](../guides/deleting-series.md).
814-
815-
### Delete series
816-
817-
```
818-
PUT,POST <prometheus-http-prefix>/api/v1/admin/tsdb/delete_series
819-
820-
# Legacy
821-
PUT,POST <legacy-http-prefix>/api/v1/admin/tsdb/delete_series
822-
```
823-
824-
Prometheus-compatible delete series endpoint.
825-
826-
_For more information, please check out the Prometheus [delete series](https://prometheus.io/docs/prometheus/latest/querying/api/#delete-series) documentation._
827-
828-
_Requires [authentication](#authentication)._
829-
830-
### List delete requests
831-
832-
```
833-
GET <prometheus-http-prefix>/api/v1/admin/tsdb/delete_series
834-
835-
# Legacy
836-
GET <legacy-http-prefix>/api/v1/admin/tsdb/delete_series
837-
```
838-
839-
List all the delete requests.
840-
841-
_Requires [authentication](#authentication)._
842-
843-
### Cancel delete request
844-
845-
```
846-
PUT,POST <prometheus-http-prefix>/api/v1/admin/tsdb/cancel_delete_request
847-
848-
# Legacy
849-
PUT,POST <legacy-http-prefix>/api/v1/admin/tsdb/cancel_delete_request
850-
```
851-
852-
Cancel a delete request while the request is still in the grace period (before the request is effectively processed by the purger and time series data is hard-deleted from the storage).
853-
854-
| URL query parameter | Description |
855-
| ------------------- | ----------- |
856-
| `request_id` | Deletion request ID to cancel. Can be obtained by the [List delete requests](#list-delete-requests) endpoint. |
857-
858-
_Requires [authentication](#authentication)._
790+
The Purger service provides APIs for requesting deletion of tenants.
859791

860792
### Tenant Delete Request
861793

0 commit comments

Comments
 (0)