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

bloom-builder: new component cannot start up because helm chart is not creating /var/loki path #14082

Closed
diranged opened this issue Sep 9, 2024 · 3 comments · Fixed by #14128
Labels
type/bug Somehing is not working as expected

Comments

@diranged
Copy link

diranged commented Sep 9, 2024

Describe the bug
In https://github.com/grafana/loki/pull/14003/files the bloom-compactor was replaced by the bloom-builder and bloom-planner. The chart removed the storage claims component, but never puts back a /var/loki volume into the bloom-builder deployment object. This cause the Loki app to come up and throw an error about the /var/loki path being a read-only filesystem:

failed to create bloom store: failed to create working directory for bloom store: '/var/loki/blooms': mkdir /var/loki: read-only file system
error initialising module: bloom-store
github.com/grafana/dskit/modules.(*Manager).initModule
	/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:138
github.com/grafana/dskit/modules.(*Manager).InitModuleServices
	/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:108
github.com/grafana/loki/v3/pkg/loki.(*Loki).Run
	/src/loki/pkg/loki/loki.go:458
main.main
	/src/loki/cmd/loki/main.go:129
runtime.main
	/usr/local/go/src/runtime/proc.go:271
runtime.goexit
	/usr/local/go/src/runtime/asm_arm64.s:1222
level=info ts=2024-09-09T17:32:46.121018936Z caller=main.go:126 msg="Starting Loki" version="(version=release-3.1.x-89fe788, branch=release-3.1.x, revision=89fe788d)"
level=info ts=2024-09-09T17:32:46.121068757Z caller=main.go:127 msg="Loading configuration file" filename=/etc/loki/config/config.yaml
level=info ts=2024-09-09T17:32:46.123855303Z caller=server.go:352 msg="server listening on addresses" http=[::]:3100 grpc=[::]:9095
level=info ts=2024-09-09T17:32:46.124320211Z caller=modules.go:748 component=bloomstore msg="no metas cache configured"
level=debug ts=2024-09-09T17:32:46.124555935Z caller=cache.go:41 component=bloomstore msg="load bloomshipper working directory into cache" path=/var/loki/blooms
level=warn ts=2024-09-09T17:32:46.12460254Z caller=cache.go:75 component=bloomstore msg="failed to walk directory" path=/var/loki/blooms dirEntry=null err="lstat /var/loki/blooms: no such file or directory"
level=info ts=2024-09-09T17:32:46.124613338Z caller=blockscache.go:420 component=bloomstore msg="run ttl evict job"
level=info ts=2024-09-09T17:32:46.124642089Z caller=blockscache.go:365 component=bloomstore msg="run metrics collect job"
level=info ts=2024-09-09T17:32:46.124630848Z caller=blockscache.go:380 component=bloomstore msg="run lru evict job"
level=error ts=2024-09-09T17:32:46.12547301Z caller=log.go:216 msg="error running loki" err="failed to create bloom store: failed to create working directory for bloom store: '/var/loki/blooms': mkdir /var/loki: read-only file system\nerror initialising module: bloom-store\ngithub.com/grafana/dskit/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:138\ngithub.com/grafana/dskit/modules.(*Manager).InitModuleServices\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:108\ngithub.com/grafana/loki/v3/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:458\nmain.main\n\t/src/loki/cmd/loki/main.go:129\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:271\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1222"

To Reproduce

  1. Turn on the bloomBuilder.enabled flag in the helm chart.
  2. Watch the failure occur
@diranged
Copy link
Author

diranged commented Sep 9, 2024

If we remove the bloom_build key from our config, the bloom-builder pod starts up... but presumably will not do any work. This is all the config had in it:

bloom_build:
  enabled: true

@diranged
Copy link
Author

diranged commented Sep 9, 2024

So we are on Loki 3.1.1 ... but by using the main-20ac1ba image tag, I can get around this... it seems that perhaps the helm chart additions need a Loki release to go along with them??

@chaudum
Copy link
Contributor

chaudum commented Sep 11, 2024

So we are on Loki 3.1.1 ... but by using the main-20ac1ba image tag, I can get around this... it seems that perhaps the helm chart additions need a Loki release to go along with them??

A Loki release (3.2.0) is planned in the near future (around ObsCon 2024).

@chaudum chaudum added the type/bug Somehing is not working as expected label Sep 11, 2024
mraboosk pushed a commit to mraboosk/loki that referenced this issue Oct 7, 2024
…na#14128)

* Fix: Do not create bloom Deployment/Statefulset if replicas=0 (fixes grafana#14090)
* Fix: Configure PV claims for bloom gateway and bloom builder correctly (fixes grafana#14082)
* Fix: Configure emphemeral storage for bloom builder working directory (fixes grafana#14084)
* Add required configuration for bloom builder and bloom gateway

---

Signed-off-by: Christian Haudum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Somehing is not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants