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

[Bug]: es.index-prefix not consistent in es jobs #4268

Open
OpenGuidou opened this issue Mar 1, 2023 · 5 comments · May be fixed by #4269
Open

[Bug]: es.index-prefix not consistent in es jobs #4268

OpenGuidou opened this issue Mar 1, 2023 · 5 comments · May be fixed by #4269
Labels

Comments

@OpenGuidou
Copy link

OpenGuidou commented Mar 1, 2023

What happened?

To be able to configure the index-prefix with ES, the flag is es.index-prefix for the collector and query components.
For the jobs (es-index-cleaner, es-rollover and es-mapping-generator), it's using directly index-prefix without the prefix.

If we're using a common configuration for all components, then the jobs are not configured correctly with the indexprefix.
Example with the jaeger helm chart:

https://github.com/jaegertracing/helm-charts/blob/main/charts/jaeger/templates/_helpers.tpl#L371

Steps to reproduce

Deploy the jaeger helm chart with the elasticsearch storage enabled.
The jobs won't be able to find the indexes.

Expected behavior

It should be aligned and use the es. prefix as well

Relevant log output

No response

Screenshot

No response

Additional context

No response

Jaeger backend version

Latest

SDK

No response

Pipeline

No response

Stogage backend

Elasticsearch

Operating system

any

Deployment model

Any

Deployment configs

No response

@OpenGuidou OpenGuidou added the bug label Mar 1, 2023
@OpenGuidou OpenGuidou linked a pull request Mar 1, 2023 that will close this issue
@yurishkuro
Copy link
Member

If the helm chart is using incorrect flags, we should fix the chart.

@OpenGuidou
Copy link
Author

Then why use the prefix for the username and password ?
https://github.com/jaegertracing/jaeger/blob/main/cmd/es-index-cleaner/app/flags.go#L29

Was it not to align the flags across all usages ?

@yurishkuro
Copy link
Member

It's fine to align all usages, but the way we do it is by supporting both new and old flags for some time, see https://github.com/jaegertracing/jaeger#version-compatibility-guarantees

@OpenGuidou
Copy link
Author

Fair enough, thanks
I'll update de PR based on that

@rbaret
Copy link

rbaret commented Feb 16, 2024

I ran into this bug this week. I had to go through the es-index-cleaner code to understand why my indices where not cleaned as per requested (No indices to delete was the only indication in the logs of the container although it was listing all indices). No indication of any sort regarding the indexPrefix being incorrect...

I had to understand how env vars were used in the es-index-cleaner to notice it was not working with the ES_INDEX_PREFIX envvar name passed by default but was expecting INDEX_PREFIX instead...

If you don't want to solve this, at least update the documentation to mention that INDEX_PREFIX in esIndexCleaner.extraEnv should be set when using storage.elasticsearch.indexPrefix ...

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

Successfully merging a pull request may close this issue.

3 participants