Open sergeyshaykhullin opened 1 year ago
Seems like table manager is deprecated
Is this a proper way to migrate to tsdb with retention?
...
compactor:
shared_store: s3
retention_enabled: true
retention_delete_delay: {{ retention_period }}
...
schema_config:
configs:
- from: "2020-01-01"
index:
period: 24h
prefix: loki_index_
object_store: s3
schema: v12
store: tsdb-shipper
...
The docs on this while between deprecation are so bad across the helm charts. This needs to be cleared up.
Just curious, is it also related to loki write storage access? i got this error
level=error ts=2023-10-03T07:27:47.099224717Z caller=flush.go:143 org_id=fake msg="failed to flush" err="failed to flush chunks: store put chunk: googleapi: Error 403: The billing account for the owning project is disabled in state closed, accountDisabled, num_chunks: 1
please let me know if this is not related. will create full separated issues,
I am not sure which Helm version you are running, but I saw that on the latest version 0.77.0
, which runs Loki version 2.9.2
there is a bug in creating the Table Manager Storage client.
In https://github.com/grafana/loki/blob/a17308db6f24874a789bacb4b441b26831d638b5/pkg/storage/factory.go#L549, you can see that if you use a store
in your schema_config
that specifies tsdb
, that it will try to create a new object client (Storage Client) with the shared_store
coming from boltdb_shipper
(i.e. boltdb-shipper.shared_store
).
Since you do not use boltdb-shipper
(and so did I), I did not specify that value under storage_configs
, hence the error message also shows that it considers the storage to be empty and not necessarily what you specified in your schema_configs
.
To fix that, I just specified the next section under my storage_configs
and it fixed the issue in table-manager
:
# for fixing error in table manager
boltdb_shipper:
shared_store: s3
I tried to see in main
, but it seems that it is already a different fixed code https://github.com/grafana/loki/blob/5e3496739c55eec7e6db013b2dae52efdfc98f30/pkg/storage/factory.go#L575
Just more context - I have decided to upgrade our Loki version from an older one, and I still need table-manager
to support older logs until all of my older logs are purged after the retention ends. I'm not entirely sure that this is the correct process, but the documentation seems to be lacking this migration process, so it seems the most intuitive to keep table-manager
and the older configs until I can say for sure that there are no more logs that their index is coming from DynamoDB table and only from a single store.
Describe the bug Table manager is failing in s3 mode because of unrecognized storage client
To Reproduce Steps to reproduce the behavior:
{} term
Expected behavior
Loki config has common.storage section, seems like table-manager should use this configuration instead
Environment:
Screenshots, Promtail config, or terminal output