-
Notifications
You must be signed in to change notification settings - Fork 183
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
Puppet did not detect changes in /etc/redis.conf
neither reapplied the template
#315
Comments
How in the world did this get approved by puppet? Isn't the whole point of puppet is that if someone hand edits a config file, puppet will automatically put it back? My colleague and I wasted an hour trying to figure out why the module wasn't "fixing" the config file after someone hand edited it - then we came across this. :( |
Looks like it's been coded this way so that it's compatible with Sentinel. 1c00414#diff-0ac866172efd29d0ddc2aa75ae6f182d |
This!
Because Sentinel rewrite the /etc/redis.conf at runtime, so puppet should not write in /etc/redis.conf |
More generally, if an administrator has altered any configuration at runtime (using |
Maybe a new Anything fancier would probably need someone to write a native type/provider (especially if you want puppet to be able to reconfigure redis without restarting it) PRs and other suggestions welcome. |
I would propose that the default behavior be to enforce file compliance unless you are using a sentinel configuration. Code could check to see if $redis::sentinel::service_enable is defined and true to use the temporary file else use the normal config file. |
I agree with all of the above, another suggestion is to use the "extra_config_file" option which you can point to another additional config file that will be included from redis.conf. |
Absolutely agreeing with that. In addition to that:
Absolutely right. But one could simply leave Same goes for Sentinels, btw. Right now, if you use this module for a Redis / Sentinel combo, every config change after a failover situation will lead to dangerous situations when the state information disappears due to the Cheers |
What are you seeing (the issue)
Someone modified
/etc/redis.conf
and put bogus values (either security issue or other guy mistake, or simply forgotten manual configuration change on machine), and future runs of Puppet never detected the change nor reapplied the correct configuration. I even myself spent a bit of time trying to figure out why Puppet runs did not recreated the file even when i deleted it from the machineWhat behaviour did you expect instead
Puppet would
/etc/redis.conf
file has been modifiedWhy
Because there:
puppet-redis/manifests/instance.pp
Line 312 in d0ee587
This is not the real configuration file which is checked by Puppet, but rather a substitute file ! Since the real
/etc/redis.conf
file is not managed by a Puppet ressource, Puppet does not detect any changes, nor shows diff !The text was updated successfully, but these errors were encountered: