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

Multitenant queries does not work with tail flag with error "multiple org IDs present" #9493

Open
andrejshapal opened this issue May 22, 2023 · 1 comment
Labels
type/bug Somehing is not working as expected

Comments

@andrejshapal
Copy link

andrejshapal commented May 22, 2023

Describe the bug
Normal queries respect multiple tenantIds in query. For example:
logcli-windows-amd64.exe --addr="https://loki-gateway.xx.live" --username="loki" --password="xxx" query --org-id="live-k8s|global-k8s" --since=1h "{namespace=\"live-core\"}"
Query above returns logs as expected.
As soon as we want to tail the logs, this does not work:
logcli-windows-amd64.exe --addr="https://loki-gateway.xxx.live" --username="loki" --password="xxx" query -t --org-id="live-k8s|global-k8s" --since=1h "{namespace=\"live-core\"}"

Tailing logs failed: Error response from server: multiple org IDs present

Query with one tenant works great:

logcli-windows-amd64.exe --addr="https://loki-gateway.xxx.live" --username="loki" --password="xxx" query -t --org-id="live-k8s" --since=1h "{namespace=\"live-core\"}"

To Reproduce
Steps to reproduce the behavior:

  1. Execute query with several tenantIds separated with |

Expected behavior
I understand the problem. Difficult to execute tailing with several tenantIds since it is getting split to several queries to each tenant. With CLI we can explicitly set tenant we want to execute tailing against. In grafana there is no such option. I think grafana team should find solution how to choose tenant for tailing in UI. It is said Loki is multitenant log storage, but in practice there are restrictions comparing with single tenant mode.

Tailing is important feature for developers.

Environment:

  • k8s
  • loki distributed
  • loki 2.8.2
@JStickler JStickler added kind/bug type/bug Somehing is not working as expected labels May 24, 2023
@jeschkies
Copy link
Contributor

Thanks for raising the issue. Tailing does not support multiple tenants. Our error message should be better here. Could you raid a sibling ticket in Grafana and Link this one?

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

No branches or pull requests

4 participants