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

Default wal to enabled in jsonnet lib #4629

Merged
merged 2 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* [4574](https://github.com/grafana/loki/pull/4574) **slim-bean**: Loki: Add a ring to the compactor used to control concurrency when not running standalone
* [4603](https://github.com/grafana/loki/pull/4603) **garrettlish**: Add date time sprig template functions in logql label/line formatter
* [4608](https://github.com/grafana/loki/pull/4608) **trevorwhitney**: Change default value of ingester lifecycler's `final_sleep` from `30s` to `0s`
* [4629](https://github.com/grafana/loki/pull/4629) **owen-d**: Default the WAL to enabled in the Loki jsonnet library

# 2.3.0 (2021/08/06)

Expand Down
2 changes: 2 additions & 0 deletions docs/sources/upgrading/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ This changes the default value for the `final_sleep` property of the ingester's
#### Ingester WAL now defaults to on, and chunk transfers are disabled by default

* [4543](https://github.com/grafana/loki/pull/4543) **trevorwhitney**: Change more default values and improve application of common storage config
* [4629](https://github.com/grafana/loki/pull/4629) **owen-d**: Default the WAL to enabled in the Loki jsonnet library
* [4624](https://github.com/grafana/loki/pull/4624) **chaudum**: Disable chunk transfers in jsonnet lib

This changes a few default values, resulting in the ingester WAL now being on by default,
and chunk transfer retries are disabled by default. Note, this now means Loki will depend on local disk by default for it's WAL (write ahead log) directory. This defaults to `wal` but can be overridden via the `--ingester.wal-dir` or via `path_prefix` in the common configuration section. Below are config snippets with the previous defaults, and another with the new values.
Expand Down
3 changes: 2 additions & 1 deletion production/ksonnet/loki/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
// flag for tuning things when boltdb-shipper is current or upcoming index type.
using_boltdb_shipper: true,

wal_enabled: false,
wal_enabled: true,
query_scheduler_enabled: false,
overrides_exporter_enabled: false,

// flags for running ingesters/queriers as a statefulset instead of deployment type.
// WAL enabled configurations automatically use statefulsets.
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 what this comment is saying?

Copy link
Member Author

Choose a reason for hiding this comment

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

The jsonnet lib tries to detect if a WAL is being used and if so, use k8s statefulsets instead of deployments and I wanted to leave a note that mentioned this explicitly. The relevant code I'm referring to is here: https://github.com/grafana/loki/blob/main/production/ksonnet/loki/wal.libsonnet#L7

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. with the line above it's ambiguous if its something that requires stateful queriers (vs just ingesters).

Copy link
Member Author

Choose a reason for hiding this comment

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

The comment precedes the stateful_ingesters line, which is what it's actually commenting (I also find the github display for this a bit weird):
image

stateful_ingesters: false,
ingester_pvc_size: '10Gi',
ingester_pvc_class: 'fast',
Expand Down