Commit e4a5605c authored by antirez's avatar antirez
Browse files

Cluster: don't rewrite slaveof config directive in cluster mode.

parent 437fc2cb
...@@ -1466,8 +1466,9 @@ void rewriteConfigSlaveofOption(struct rewriteConfigState *state) { ...@@ -1466,8 +1466,9 @@ void rewriteConfigSlaveofOption(struct rewriteConfigState *state) {
sds line; sds line;
/* If this is a master, we want all the slaveof config options /* If this is a master, we want all the slaveof config options
* in the file to be removed. */ * in the file to be removed. Note that if this is a cluster instance
if (server.masterhost == NULL) { * we don't want a slaveof directive inside redis.conf. */
if (server.cluster_enabled || server.masterhost == NULL) {
rewriteConfigMarkAsProcessed(state,"slaveof"); rewriteConfigMarkAsProcessed(state,"slaveof");
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment