ansible-redis icon indicating copy to clipboard operation
ansible-redis copied to clipboard

Restart Fails when Password Changes

Open psycotica0 opened this issue 8 years ago • 2 comments

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.

psycotica0 avatar Aug 08 '16 18:08 psycotica0

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

DavidWittman avatar Nov 15 '16 14:11 DavidWittman

This should be fixed when using the systemd in 1.2.0, as it does not use the CLI to shutdown.

danielkza avatar Nov 15 '16 16:11 danielkza