Add cluster-enabled and cluster-config-file to "config get" command

55 views
Skip to first unread message

Marcos NiLs

unread,
Jun 11, 2015, 12:10:53 AM6/11/15
to redi...@googlegroups.com
Sorry if I'm reposting I ran a quick search and I didn't find anything about this.

Scenario: 

1) I create a test cluster with the ./utils/create-cluster utility in the redis-source code

2) I want to dump the config of one of the nodes so I can kill it and start it again with the same config that was running previously. 

3) As nodes are started without a config file I dumpy the config using "config get *" and apply some AWK to format it as a redis-conf file.

4) I try to start the cluster node again and I realize the cluster-enabled and cluster-config-file options are missing


I understand that "config set" doesn't support this properties as switching between the two modes "on the fly" doesn't make sense, but It'd be nice that "config get" retrieves those values so it's easy to dump and apply a config for cluster instances running with memory configuration.

The Baldguy

unread,
Jun 12, 2015, 2:15:15 PM6/12/15
to redi...@googlegroups.com
Curious as to why you don't simply use the generated config files. For example, with a sample use of the create-cluster utility I see config files generated for every cluster node. You can see the details of this by looking at the create-cluster shell script. All of the cluster specific stuff is passed in as command line options and the cluster layout is done in the config file (set in the shell script). Cluster has to have a file to save it's state to, so the file you're looking for is already written by the system. Copy that file over, duplicate (extract and integrate?) the command line in your service init script on the node and it'll start up with the same configuration. Copying the existing config file seems easier than calling config get and applying Awk. ;)

That said, I would agree with the notion `config get *` should get all known config directives.
Reply all
Reply to author
Forward
0 new messages