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

Remove shared_store and shared_store_key_prefix from shipper and compactor #10840

Merged
merged 20 commits into from
Oct 30, 2023

Conversation

ashwanthgoli
Copy link
Contributor

@ashwanthgoli ashwanthgoli commented Oct 10, 2023

What this PR does / why we need it:

Removes shared_store and shared_store_key_prefix from index shipper and compactor configs and their corresponding CLI flags.

  • -tsdb.shipper.shared-store
  • -boltdb.shipper.shared-store
  • -tsdb.shipper.shared-store.key-prefix
  • -boltdb.shipper.shared-store.key-prefix
  • -boltdb.shipper.compactor.shared-store
  • -boltdb.shipper.compactor.shared-store.key-prefix

shared_store has been a confusing option allowing users to easily misconfigure Loki.
Going forward object_store setting in the period_config (which already configured the store for chunks) will be used to configure store for the index.

And the newly added path_prefix option under the index key in period_config will configure the path under which index tables are stored.

This change enforces chunks and index files for a given period reside together in the same storage bucket. More details in the upgrade guide.


-compactor.delete-request-store has to be explicitly configured going forward. Without setting this, loki wouldn't know which object store to use for storing delete requests. Path prefix for storing deletes is decided by -compactor.delete-request-store.key-prefix which defaults to index/.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • 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

@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Oct 10, 2023
@ashwanthgoli ashwanthgoli marked this pull request as ready for review October 11, 2023 10:28
@ashwanthgoli ashwanthgoli requested a review from a team as a code owner October 11, 2023 10:28
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] I'm not sure if we should drop some of the examples now that we've simplified things.

docs/sources/configure/examples/11-COS-HMAC-Example.yaml Outdated Show resolved Hide resolved
@@ -29,7 +29,6 @@ storage_config:
tsdb_shipper:
active_index_directory: /loki/index
cache_location: /loki/index_cache
shared_store: s3
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question as before I think the names of the examples need to be changed, otherwise it's confusing to not see S3 anywhere in the example. (Same for the other examples, not going to comment on every single one.)

Also kind of wondering if having a dozen examples makes sense anymore if they're all going to mostly be the same...

docs/sources/setup/upgrade/_index.md Outdated Show resolved Hide resolved
docs/sources/setup/upgrade/_index.md Outdated Show resolved Hide resolved
docs/sources/setup/upgrade/_index.md Outdated Show resolved Hide resolved
docs/sources/setup/upgrade/_index.md Show resolved Hide resolved
# Shared store for keeping index files. Supported types: gcs, s3, azure, cos,
# filesystem
# CLI flag: -tsdb.shipper.shared-store
[shared_store: <string> | default = ""]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about removing them. Shouldn't we rather deprecate them first and later remove it?

IIUC, as it currently works, you can write index files and chunks to different storages. I doubt anyone will be doing this but If we remove this, any user in this situation won't be able to upgrade Loki. Instead, by deprecating it, we let the user upgrade and do their diligence to deprecate it on their end.

pkg/storage/config/schema_config.go Show resolved Hide resolved
@ashwanthgoli ashwanthgoli changed the title shipper: remove shared_store and shared_store_key_prefix Remove shared_store and shared_store_key_prefix from shipper and compactor Oct 19, 2023
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]

docs/sources/setup/upgrade/_index.md Outdated Show resolved Hide resolved
docs/sources/setup/upgrade/_index.md Outdated Show resolved Hide resolved
docs/sources/setup/upgrade/_index.md Outdated Show resolved Hide resolved
docs/sources/setup/upgrade/_index.md Outdated Show resolved Hide resolved
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] LGTM, just one more suggestion.

@@ -20,6 +20,7 @@ Log entry deletion relies on configuration of the custom logs retention workflow
## Configuration

Enable log entry deletion by setting `retention_enabled` to true in the compactor's configuration and setting and `deletion_mode` to `filter-only` or `filter-and-delete` in the runtime config.
`delete_request_store` also needs to be configured when retention is enabled to process delete requests, this decides the storage bucket that stores the delete requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`delete_request_store` also needs to be configured when retention is enabled to process delete requests, this decides the storage bucket that stores the delete requests.
`delete_request_store` also needs to be configured when retention is enabled to process delete requests, this determines the storage bucket that stores the delete requests.

@salvacorts
Copy link
Contributor

@ashwanthgoli can you update the templates and tests for the deprecated config checker tool?
(Once you do it, can you add a link to the commit here?)

Copy link
Contributor

@salvacorts salvacorts left a comment

Choose a reason for hiding this comment

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

LGTM. Awesome work :)

@ashwanthgoli ashwanthgoli enabled auto-merge (squash) October 30, 2023 11:38
@ashwanthgoli ashwanthgoli merged commit a118e99 into main Oct 30, 2023
6 checks passed
@ashwanthgoli ashwanthgoli deleted the ashwanth/remove-shared-store branch October 30, 2023 11:46
ashwanthgoli added a commit that referenced this pull request Oct 31, 2023
…actor (#10840)

**What this PR does / why we need it**:
#### Removes `shared_store` and `shared_store_key_prefix` from index
shipper and compactor configs and their corresponding CLI flags.

- `-tsdb.shipper.shared-store`
- `-boltdb.shipper.shared-store`
- `-tsdb.shipper.shared-store.key-prefix`
- `-boltdb.shipper.shared-store.key-prefix`
- `-boltdb.shipper.compactor.shared-store`
- `-boltdb.shipper.compactor.shared-store.key-prefix`

`shared_store` has been a confusing option allowing users to easily
misconfigure Loki.
Going forward `object_store` setting in the
[period_config](https://grafana.com/docs/loki/latest/configure/#period_config)
(which already configured the store for chunks) will be used to
configure store for the index.

And the newly added `path_prefix` option under the `index` key in
`period_config` will configure the path under which index tables are
stored.

This change enforces chunks and index files for a given period reside
together in the same storage bucket. More details in the upgrade guide.

---

`-compactor.delete-request-store` has to be **explicitly configured**
going forward. Without setting this, loki wouldn't know which object
store to use for storing delete requests. Path prefix for storing
deletes is decided by `-compactor.delete-request-store.key-prefix` which
defaults to `index/`.


**Checklist**
- [X] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [X] Documentation added
- [X] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [X] 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)
ashwanthgoli added a commit that referenced this pull request Nov 1, 2023
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
…actor (grafana#10840)

**What this PR does / why we need it**:
#### Removes `shared_store` and `shared_store_key_prefix` from index
shipper and compactor configs and their corresponding CLI flags.

- `-tsdb.shipper.shared-store`
- `-boltdb.shipper.shared-store`
- `-tsdb.shipper.shared-store.key-prefix`
- `-boltdb.shipper.shared-store.key-prefix`
- `-boltdb.shipper.compactor.shared-store`
- `-boltdb.shipper.compactor.shared-store.key-prefix`

`shared_store` has been a confusing option allowing users to easily
misconfigure Loki.
Going forward `object_store` setting in the
[period_config](https://grafana.com/docs/loki/latest/configure/#period_config)
(which already configured the store for chunks) will be used to
configure store for the index.

And the newly added `path_prefix` option under the `index` key in
`period_config` will configure the path under which index tables are
stored.

This change enforces chunks and index files for a given period reside
together in the same storage bucket. More details in the upgrade guide.

---

`-compactor.delete-request-store` has to be **explicitly configured**
going forward. Without setting this, loki wouldn't know which object
store to use for storing delete requests. Path prefix for storing
deletes is decided by `-compactor.delete-request-store.key-prefix` which
defaults to `index/`.


**Checklist**
- [X] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [X] Documentation added
- [X] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [X] 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)
budimanjojo added a commit to budimanjojo/home-cluster that referenced this pull request May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL 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.

3 participants