From 7d059ce03b837b069f63cb77bd3573c43e0b0b5c Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Fri, 11 May 2018 17:03:20 +0200 Subject: [PATCH] Adding init script for cluster start --- dicos/90_redis.xml | 5 ++++- tmpl/redis-cluster.conf | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dicos/90_redis.xml b/dicos/90_redis.xml index 5d1b8f7..7b657c6 100644 --- a/dicos/90_redis.xml +++ b/dicos/90_redis.xml @@ -43,8 +43,10 @@ Leader + + @@ -94,7 +96,8 @@ rdClmask - + + rdClMemberIP rdClMemberPort rdClMemberRole rdClMemberMaster diff --git a/tmpl/redis-cluster.conf b/tmpl/redis-cluster.conf index 4589269..9d1d371 100644 --- a/tmpl/redis-cluster.conf +++ b/tmpl/redis-cluster.conf @@ -1,6 +1,6 @@ %if %%getVar('activer_redis','non') == 'oui' and %%getVar('redisRole','Node') == 'Leader' -127.0.0.1:%%{redisPort}:master:: -%for %%node in %%getVar('rdClMemberIP',[]) -%%{node}:%%{node.rdClMemberPort}:%%{node.rdClMemberRole}:%%{node.rdClMemberMaster} +Leader:127.0.0.1:%%{redisPort}:master:: +%for %%node in %%getVar('rdClMember',[]) +%%{node}:%%{node.rdClMemberIP}:%%{node.rdClMemberPort}:%%{node.rdClMemberRole}:%%{node.rdClMemberMaster}: %end for %end if