coredump/resource-agents — pull request #1 by michael-dev (2012-08-30 16:45:30+00:00)
Title: redis: bring up in slave mode

When the master goes down, pacemaker expects the secondary to stay in slave mode until it promotes it. If the master now comes up too fast, pacemaker sees two masters running while there is no promoted host. So both instances are failing (being master while they should be slaves), thus being restartet and still coming up as masters while pacemaker expects them to come up as slaves, so it restarts them again. Inifinitely often, until the admin stops one redis server manually, then the other gets promoted and the first can recover (as redis_start sees a promoted host).

This is fixed by creating a temporary file indicating slave mode even if redis currently has no master set.

Setting an invalid master (e.g. 0.0.0.0) is not an option, as it would result in dataloss (setting a master makes redis to discard its state, by documentation on redis.io).