Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node to cluster command #228

Merged
merged 8 commits into from
Nov 18, 2014
Merged

Add node to cluster command #228

merged 8 commits into from
Nov 18, 2014

Conversation

ppikula
Copy link
Contributor

@ppikula ppikula commented Jun 25, 2014

I've introduced new commands to mongooseimctl - add_to_cluster and remove_from_cluster that simplify clustering procedure. Moreover I've added add_table_copy to all mnesia modules, it is useful when configuration changes and new modules with mnesia tables are added, then it will create replicas.

Is the add_table_copy going to break anything, should all the tables have replicas on each node?
Maybe it is a good idea to make it configurable?


RES=`$NODETOOL ping`
if [ "$RES" = "pong" ]; then
echo "Error: Node is already running! Stop the node and delete Mnesia database directory."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would print the $MNESIA_DIR in this message also just to make it more clear what to remove.

@michalwski
Copy link
Contributor

Is the add_table_copy going to break anything, should all the tables have replicas on each node?

No, this shouldn't break anything. It will just force replicating given table on the current node as you noticed.

Maybe it is a good idea to make it configurable?

Yes, that's a good idea. I think every module creating the mnesia table should have parameter:

{local_replicas, [{TableName Type}]}

Where TableName is the mnesia table name (usually there is one table per module but some modules requires more tables). Type is either ram_copies, disc_copies, disc_only_copies or none. The last one means that given node will not have replica for given table. If not specified the behaviour should be like it is now, in this pull request I mean.

@michalwski
Copy link
Contributor

any chance to finish this?

@mongoose-im
Copy link
Collaborator

travis is using test branch add_node_to_cluster_command from https://github.com/esl/ejabberd_tests/tree/add_node_to_cluster_command

michalwski added a commit that referenced this pull request Nov 18, 2014
@michalwski michalwski merged commit 54030ad into master Nov 18, 2014
@michalwski michalwski deleted the add_node_to_cluster_command branch December 5, 2014 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants