-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
The parameters secrets and init_defaults defined in an instance lead to a loop #984
Comments
Here's a manifest that leads to the problem
If the parameter restart_config_change is set to false then it will work as expected. |
Another workaround is to define the keystore values yourself, and not rely on the module.
The module does a lot of checking, which is where the dependency loop comes in. Setting restart-after-config to false is not viable in our environment, so this is getting us the secrets functionality back. |
I wasn't aware there was an issue open for this. Whilst testing Elastic 7.x support, I fell foul of this issue. As @ml14tlc correctly identified, in manifests/service/systemd.pp, this augeas resource is called:
And as @sysadmin1139 noticed, elasticsearch_keystore resource causes the loop. This is due to the name of the augeas resource in this provider. lib/puppet/type/elasticsearch_keystore.rb
If the instance is called es-01, then two resources will be called augeas { 'defaults_es-01': } and cause the loop. My simple fix was the rename the resource in elasticsearch_keystore to ks_defaults_#{self[:name]}. I have added this to my Elastic 7.x PR. |
Bug description
When I configure an instance specifying the options secrets (to manage the file elasticsearch.keystore) and init_defaults, I get the following error:
The file cycles.dot is attached.
The workaround is to use init_defaults_file in order to enter the if branch in the following code snippet from manifests/service/systemd.pp starting at row 104 (Module version 6.3.3)
It would be nice to be able to use init_defaults since in my use case it's easier to provide a hash rather than uploading a file to the master.
The text was updated successfully, but these errors were encountered: