-
-
Notifications
You must be signed in to change notification settings - Fork 478
-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Multiple default providers found after upgrade to ES 6.3.2 #975
Comments
I forgot to note: I also tried to set a default provider with
|
It looks like the proper work around is to remove |
Thanks for doing so much debugging legwork here @JohnLyman, I really appreciate it ❤️ . When you say that the log4j2 file needs to be there, is ES failing to startup without it? I don't think Puppet manages that file in the The whole situation is certainly kind of tricky in the upgrade scenario, but I do think the module shouldn't just outright break in that case. |
In the end what is the correct precedence for user/role files?
The correct files are in the |
@tylerjl log4j2.properties is managed in the @marcomusso I'm not completely sure of the precedence. I'm pretty sure ES 6.3.0 and above wants those files in |
Indeed, it seems that the puppet modules creates default empty files and another part of the module (x-pack) creates the correct file without the instance knowing which are the effective ones and probably acting on a default that reads those empty ones. |
Hi, I can confirm that it only reads the files in /etc/elasticsearch/instance. I found out when all my role mappings were broken. First fix I tried was to symlink the files but I figured that'd be quite fragile and might interfere with upgrades. on the next node I tried to clean up the files that aren't inside the x-pack directories (and haven't been managed by the Puppet module), but this didn't allow the ES node to pick up the configurations. Reading here: https://www.elastic.co/guide/en/elastic-stack-overview/6.3/mapping-roles.html#mapping-roles-file seems to indicate that the default location isn't inside the x-pack directory but in the ES_PATH_CONF directory, so the module should be creating them there in a 6.3+ system. |
Just to follow up on my comment. If you remove the files in |
We have the exact same issue as @marcomusso. Do you have any eta for a fix here? |
I have a weird workaround in place: symlinking to the correct files. |
Hi, just checking in here. @marcomusso - did your workaround persist when you were upgrading elasticsearch? In which direction did you symlink the files? Was the symlink in the |
I symlink from the instance config directory to the xpack directory (output slightly redacted):
The link persists as I enforce it with Puppet. |
We also see this for elasticsearch_license, even on 5.6.14...
Probably shouldn't have multiple "default" providers :) |
Bug description
After upgrading ES 6.2.4 -> 6.3.2, I'm getting the following:
Note: I am not using the OSS package.
As far as I can tell, the provider code is looking for the existence of (for example)
/etc/elasticsearch/role_mapping.yml
or/etc/elasticsearch/x-pack/role_mapping.yml
to determine which provider to use. I have both (as well as/etc/elasticsearch/<instance>/role_mapping.yml
and/etc/elasticsearch/<instance>/x-pack/role_mapping.yml
!)Because this was an upgrade, it makes sense that I have these files in
/etc/elasticsearch/x-pack
. The problem is that the rpm also places default versions of the files in/etc/elasticsearch
:If I remove the files in
/etc/elasticsearch
and keep the/etc/elasticsearch/x-pack
versions, Puppet does not complain about multiple providers and works fine. If I do the opposite (removex-pack
subdirectory), Puppet does not complain about multiple providers, but fails after creating thex-pack
directory andx-pack/log4j2.properties
due to Elasticsearch_role dependency failures.Although I could have Puppet ensure the
/etc/elasticsearch
versions of the file do not exist, I'm afraid I'd have the same issue after any future upgrade. It's also not ideal because the provider code would detect the existence of those files before Puppet would have a chance to remove them.The text was updated successfully, but these errors were encountered: