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

With Cassandra as storage, Loki always use "QUORUM" consystency level #2207

Closed
rbudiharso opened this issue Jun 11, 2020 · 1 comment
Closed
Labels
stale A stale issue or PR that will automatically be closed.

Comments

@rbudiharso
Copy link

Describe the bug
When using Cassandra as index and chunk storage, loki always use "QUORUM" consistency level even though in the configuration is specified to use "LOCAL_ONE". I haven't try to use any other consistency level to see whether it's just "LOCAL_ONE" or any other consistency level other than "QUORUM"

this is the config snippet:

schema_config:
  configs:
  - from: 2020-01-01
    store: cassandra
    object_store: cassandra
    schema: v11
    index:
      prefix: index_
      period: 360h
    chunks:
      prefix: chunk_
      period: 360h
storage_config:
  cassandra:
    auth: true
    username: cassandra
    password: password
    consistency: LOCAL_ONE
    addresses: cassandra.monitoring.svc.cluster.local
    keyspace: loki

To Reproduce
Steps to reproduce the behavior:

  1. helm install -f values.yaml loki loki/loki-stack
  2. kubectl logs -f <loki-pod>

Expected behavior
Loki run and use cassandra as storage

Environment:

  • kubernetes

Screenshots, Promtail config, or terminal output
loki log:

level=info ts=2020-06-11T00:35:13.148533084Z caller=server.go:179 http=[::]:3100 grpc=[::]:9095 msg="server listening on addresses"
level=error ts=2020-06-11T00:35:13.228113651Z caller=log.go:140 msg="error initialising loki" err="gocql: unable to create session: unable to discover protocol version: Unable to perform authentication: Cannot achieve consistency level QUORUM\ngithub.com/cortexproject/cortex/pkg/chunk/cassandra.(*Config).session\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/chunk/cassandra/storage_client.go:110\ngithub.com/cortexproject/cortex/pkg/chunk/cassandra.NewTableClient\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/chunk/cassandra/table_client.go:20\ngithub.com/cortexproject/cortex/pkg/chunk/storage.NewTableClient\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/chunk/storage/factory.go:283\ngithub.com/grafana/loki/pkg/loki.(*Loki).initTableManager\n\t/src/loki/pkg/loki/modules.go:249\ngithub.com/grafana/loki/pkg/loki.(*Loki).initModuleServices\n\t/src/loki/pkg/loki/loki.go:192\ngithub.com/grafana/loki/pkg/loki.New\n\t/src/loki/pkg/loki/loki.go:134\nmain.main\n\t/src/loki/cmd/loki/main.go:76\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357\ngithub.com/cortexproject/cortex/pkg/chunk/cassandra.NewTableClient\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/chunk/cassandra/table_client.go:22\ngithub.com/cortexproject/cortex/pkg/chunk/storage.NewTableClient\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/chunk/storage/factory.go:283\ngithub.com/grafana/loki/pkg/loki.(*Loki).initTableManager\n\t/src/loki/pkg/loki/modules.go:249\ngithub.com/grafana/loki/pkg/loki.(*Loki).initModuleServices\n\t/src/loki/pkg/loki/loki.go:192\ngithub.com/grafana/loki/pkg/loki.New\n\t/src/loki/pkg/loki/loki.go:134\nmain.main\n\t/src/loki/cmd/loki/main.go:76\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357\nerror initialising module: table-manager\ngithub.com/grafana/loki/pkg/loki.(*Loki).initModuleServices\n\t/src/loki/pkg/loki/loki.go:194\ngithub.com/grafana/loki/pkg/loki.New\n\t/src/loki/pkg/loki/loki.go:134\nmain.main\n\t/src/loki/cmd/loki/main.go:76\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357"

2020-06-11T07:34+07:00

@stale
Copy link

stale bot commented Jul 11, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jul 11, 2020
@stale stale bot closed this as completed Jul 18, 2020
cyriltovena pushed a commit to cyriltovena/loki that referenced this issue Jun 11, 2021
* Make spread flushes and no jitter the defaults for single process.

Signed-off-by: Tom Wilkie <[email protected]>

* Make bigchunk encoding the default.

Signed-off-by: Tom Wilkie <[email protected]>

* Add to changelog (and reorder a couple of entries.)

Signed-off-by: Tom Wilkie <[email protected]>

* Update CHANGELOG.md

Co-Authored-By: Bryan Boreham <[email protected]>

* Fixed tests

Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Marco Pracucci <[email protected]>
Co-authored-by: Bryan Boreham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

No branches or pull requests

1 participant