ansible-redis
ansible-redis copied to clipboard
Restart Fails when Password Changes
If you use the ansible role to change the auth for a server, it will rewrite the password in the config file. To restart, though, the generated service uses the CLI interface to run commands, with the CLI interface reading from the config file we've already overwritten, so it just fails to auth to itself, since it's using the new password while the old server is still running.
This is made worse because the service just fires the CLI message and then takes it on faith that it will work, and goes into a while
loop waiting for the pid file to disappear to declare success.
But, when there's an auth error and the server doesn't actually get the message about the restart, the restart service will block for all time.
Thanks for reporting this issue, @psycotica0. We're probably better off using a SIGTERM
to shutdown Redis as opposed to being forced to authenticate to run the shutdown
command.
http://redis.io/topics/signals
This should be fixed when using the systemd in 1.2.0, as it does not use the CLI to shutdown.