-
Notifications
You must be signed in to change notification settings - Fork 313
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
Use Elasticsearch's logging configuration #1371
Comments
Thanks! This make a lot of sense. One question: would it make more sense to use a |
I'd be fine either way as long as the file name is not hardcoded in Rally. I'd treat my summary above as a proposal / hint rather than a prescription how it must be done. :)
In fact, I would prefer if benchmarks break on a new configuration file because it explicitly alerts us of a change that might influence benchmarks so we need to make a concious decision how to handle it. |
A new configuration file would be in the release notes, hopefully? However, elastic/elasticsearch#61474 was only mentioned in passing in https://www.elastic.co/guide/en/elasticsearch/reference/7.10/release-notes-7.10.0.html. Nothing in the release notes warns users about updating their log4j configuration. I'm wondering because the natural evolution of my suggestion is to just overwrite the files that are in rally-teams instead of having to maintain a list at all. Would that make sense? |
Even if that would be the case, we benchmark against master so by the time we see the release notes it's likely already too late?
I like the direction. We'd rather not break our users without any chance for them to upgrade so for a grace period I still think that we need to keep |
I don't know what makes Docker different here, sorry. |
The config files are already embedded in the Docker image. I think it's sufficient that we just don't provide a file outside the container and mount it. So it's just the semantics of "overwriting" files in rally-teams are different but now that I think of it more I don't think that's a problem. Nevertheless, we still have the issue with backwards-compatibility, both for Docker and the tar.gz distribution. So I still think a deny / allowlist concept is necessary, at least for a transition period. |
Historically Rally needed to modify Elasticsearch's logging configuration, e.g. to enable verbose logging for the
IndexingMemoryController
. We've removed the surrounding infrastructure in Rally a while ago. Therefore, Rally can just use the logging configuration that is shipped with Elasticsearch.Implementation notes
Before applying the configuration in rally-teams, Rally wipes the Elaticsearch's configuration directory:
rally/esrally/mechanic/provisioner.py
Line 185 in 24dee9e
Then, it applies the configuration; it writes files in append mode (this allows mixins to contribute to the configuration):
rally/esrally/mechanic/provisioner.py
Lines 156 to 166 in 24dee9e
A possible solution is to delete all but the
log4j2.properties
file and then apply the config as is. We should not hardcode that name though but instead introduce a "allowlist" concept (files to keep from the original config). The allowlist would be defined in rally-teams and evaluated by Rally. For backwards-compatibility we should also explicitly skip copying any files on the allowlist.We also have a dedicated provisioner for the Docker image which writes config files to a directory on the host and then provides each file via a mount:
rally/esrally/mechanic/provisioner.py
Lines 466 to 476 in 24dee9e
Here, it is sufficient to only skip copying any file on the allowlist.
The text was updated successfully, but these errors were encountered: