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

tenant: don't log missing tenant for watchdog #875

Closed
wants to merge 2 commits into from

Conversation

stefanhengl
Copy link
Member

I suspect that most if not all of the "missing_tenant" profiles we see come from watchdog.
Here we add the same skipLogging marker we use in Sourcegraph.

@cla-bot cla-bot bot added the cla-signed label Dec 9, 2024
@stefanhengl stefanhengl marked this pull request as ready for review December 9, 2024 14:45
Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

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

Can't the watchdog rather just use tenant 1?

@stefanhengl
Copy link
Member Author

stefanhengl commented Dec 9, 2024

Can't the watchdog rather just use tenant 1?

yup, we could do that too. I don't mind either. Any reason to prefer one over the other?

Copy link
Member

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

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

Is it the case that when MT is enabled, watchdog will not actually search any data because there's no tenant in context? So it's not actually doing its 'watching' as originally intended. This same endpoint is used for k8 healthz monitoring. If I'm understanding right, it seems like we should update this to actually search some data!

@stefanhengl
Copy link
Member Author

stefanhengl commented Dec 12, 2024

Is it the case that when MT is enabled, watchdog will not actually search any data because there's no tenant in context? So it's not actually doing its 'watching' as originally intended. This same endpoint is used for k8 healthz monitoring. If I'm understanding right, it seems like we should update this to actually search some data!

Yes and no. It will trigger a proper search and trigger the full pipeline but it won't find anything.

If we want to return results we either have to impersonate an existing tenant or give it system privileges to search across tenants. There is also the option to ship Zoekt with a dummy index belonging to tenant 1, but we would have to filter results from this repo for normal searches and make sure the index isn't cleaned up.

stefanhengl added a commit that referenced this pull request Dec 12, 2024
This is an alternative to #875.

We run the health check with system priviledges. This way we run an
actual search, just like we do if tenant enforcement is off.

I also make sure we don't log system searches as "missing_tenant".
stefanhengl added a commit that referenced this pull request Dec 12, 2024
This is an alternative to #875.

We run the health check with system priviledges. This way we run an
actual search, just like we do if tenant enforcement is off.

I also make sure we don't log system searches as "missing_tenant".
stefanhengl added a commit that referenced this pull request Dec 12, 2024
This is an alternative to #875.

We run the health check with system priviledges. This way we run an
actual search, just like we do if tenant enforcement is off.

I also make sure we don't log system searches as "missing_tenant".
@stefanhengl
Copy link
Member Author

Closing this in favor of #877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants