From 825e07f2fd8949cffabcc0d5800ea46778dddafd Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 22 Feb 2013 19:24:01 +0100 Subject: [PATCH] Cluster: if no previous config exists, create the myself node as master. --- src/cluster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index 69ca31b7..16bc07fd 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -229,7 +229,8 @@ void clusterInit(void) { if (clusterLoadConfig(server.cluster_configfile) == REDIS_ERR) { /* No configuration found. We will just use the random name provided * by the createClusterNode() function. */ - server.cluster->myself = createClusterNode(NULL,REDIS_NODE_MYSELF); + server.cluster->myself = + createClusterNode(NULL,REDIS_NODE_MYSELF|REDIS_NODE_MASTER); redisLog(REDIS_NOTICE,"No cluster configuration found, I'm %.40s", server.cluster->myself->name); clusterAddNode(server.cluster->myself);