bloomberg / redis-cookbook

A set of Chef recipes for installing and configuring Redis.
Apache License 2.0
19 stars 19 forks source link

Avoid rewriting sentinel config files #18

Open richmolj opened 7 years ago

richmolj commented 7 years ago

redis-sentinel works by rewriting the sentinel.conf during state changes (failover, new slave added, etc). However, Chef will come along and blow away those state changes during the next convergence.

This is addressed in the open-source redisio cookbook:

Redis-sentinel will write configuration and state data back into its configuration file. This creates obvious problems when that config is managed by chef. This cookbook will create the config file once, and then leave a breadcrumb that will guard against the file from being updated again.

This issue is for implementing a similar pattern within this cookbook. Without this, redis-sentinel will not work properly.

johnbellone commented 7 years ago

@richmolj What's the best mode of operation here? Only write the config if it doesn't exist?