summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* change semantics of the cluster status operationsFrancesco Mazzoli2012-06-271-55/+54
| | | | | Now they use the file only when offline. Also I change the naming, from a `cluster_nodes_status' suffix to `cluster_status_file'.
* change `rabbit_mnesia:cluster_status_if_running' slightlyFrancesco Mazzoli2012-06-271-8/+12
|
* check if only running disc node only in the required placesFrancesco Mazzoli2012-06-271-4/+6
|
* check that the node is in the cluster in `rabbit_mnesia:remove_node/1'Francesco Mazzoli2012-06-261-0/+5
|
* remove the node from the running node when neededFrancesco Mazzoli2012-06-261-18/+23
|
* notify cluster of new nodes as soon as they join, and not when they startFrancesco Mazzoli2012-06-262-14/+38
|
* merge defaultFrancesco Mazzoli2012-06-228-720/+867
|\
| * merge defaultFrancesco Mazzoli2012-06-208-30/+23
| |\
| * | add a "leave cluster" hook in `rabbit_node_monitor', handle cluster nodes ↵Francesco Mazzoli2012-06-142-27/+66
| | | | | | | | | | | | joins/departures better
| * | merge defaultFrancesco Mazzoli2012-06-147-707/+815
| |\ \
| | * \ merge defaultFrancesco Mazzoli2012-06-147-707/+815
| | |\ \
| | | * \ merge defaultFrancesco Mazzoli2012-06-128-106/+94
| | | |\ \
| | | * | | revert last commitFrancesco Mazzoli2012-06-124-77/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I had completely misunderstood what fhc does. I'll put the atomic changes to the cluster status file in the `rabbit_node_monitor'.
| | | * | | add node to existing cluster status instead of creating a new one on ↵Francesco Mazzoli2012-06-064-40/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on_node_{up,down} This is because the invocation might come before the mnesia data is propagated correctly.
| | | * | | stop mnesia after cluster operationFrancesco Mazzoli2012-06-011-0/+4
| | | | | |
| | | * | | first attempt at refactoring `rabbit_mnesia:init_db'Francesco Mazzoli2012-06-012-94/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only potentially dangerous thing is that I always upgrade locally, while before that was only done when we know that we need an upgrade.
| | | * | | tidy exports and specsFrancesco Mazzoli2012-05-312-24/+42
| | | | | |
| | | * | | fix and improve `rabbit_mnesia:remove_node/1' in many waysFrancesco Mazzoli2012-05-311-56/+94
| | | | | |
| | | * | | merge defaultFrancesco Mazzoli2012-05-307-697/+775
| | | |\ \ \
| | | | * \ \ merge defaultFrancesco Mazzoli2012-05-307-697/+774
| | | | |\ \ \
| | | | | * | | set up cluster beforehand in testsFrancesco Mazzoli2012-05-291-13/+33
| | | | | | | |
| | | | | * | | remove cluster managment tests, adjust the othersFrancesco Mazzoli2012-05-281-199/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some misterious reason if we stop/start cover in `run_cluster_dependent_tests' things fail. Also, the proxy is not working and I can't test the qpid suite, but I wouldn't expect surprises.
| | | | | * | | merge defaultFrancesco Mazzoli2012-05-286-486/+741
| | | | | |\ \ \
| | | | | | * | | comments in `prepare/0'Francesco Mazzoli2012-05-251-0/+5
| | | | | | | | |
| | | | | | * | | forgot `check_cluster_consistency/0' call in `prepare/0'Francesco Mazzoli2012-05-251-0/+1
| | | | | | | | |
| | | | | | * | | merge defaultFrancesco Mazzoli2012-05-256-486/+735
| | | | | | |\ \ \
| | | | | | | * | | handle legacy `cluster_nodes.config' and `running_nodes_at_shutdown'Francesco Mazzoli2012-05-243-38/+85
| | | | | | | | | |
| | | | | | | * | | added `rabbit_mnesia:remove_node/1' to remove node from clusters remotelyFrancesco Mazzoli2012-05-232-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maybe I'll add more explicit checks - e.g. whether the node to be remote is offline - for better error messages. Also, as discussed with Simon, we probably need to add machinery to monitor when offline nodes leave clusters.
| | | | | | | * | | fiddling with `rabbit_mnesia' specsFrancesco Mazzoli2012-05-231-2/+2
| | | | | | | | | |
| | | | | | | * | | add `rabbit_misc:rabbit_version/0'Francesco Mazzoli2012-05-232-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also, `get_key', not `get_env'.
| | | | | | | * | | deleted percent by mistakeFrancesco Mazzoli2012-05-231-1/+1
| | | | | | | | | |
| | | | | | | * | | stricter cluster consistency checkFrancesco Mazzoli2012-05-231-20/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now checking for matching OTP & rabbit version
| | | | | | | * | | ooops... do not update the cluster status file with its own dataFrancesco Mazzoli2012-05-221-1/+3
| | | | | | | | | |
| | | | | | | * | | fix but in `rabbit_mnesia:status/0'Francesco Mazzoli2012-05-221-2/+5
| | | | | | | | | |
| | | | | | | * | | forgot to replace old functionFrancesco Mazzoli2012-05-211-7/+1
| | | | | | | | | |
| | | | | | | * | | change the cluster nodes functions to rely on the cluster status file onlyFrancesco Mazzoli2012-05-211-116/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + some other fixes based on the fact that now we firmly assume that the cluster status is as up to date as it can be.
| | | | | | | * | | change rabbitmqctl `join_cluster', add `recluster' and `change_node_type'Francesco Mazzoli2012-05-212-48/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also, remove `cluster'. Description for the commands: * recluster <clusternode> Instruct an offline node to try to cluster with the nodes provided when it comes back online. With "cluster" I mean cluster directly, only if the other nodes think the node is in the cluster already. This command is useful if we bring a node down and then change the cluster while it is offline. * change_node_type (ram|disc) Changed the node to the provided node type. The change will fail if the user is trying to create a standalone ram node. * join_cluster clusternode Same as before, but only takes one node as "discovery" node. We think this is better since we don't really make any attempt to verify that all the provided nodes are in the same cluster anyways.
| | | | | | | * | | moved functions around in rabbit_mnesiaFrancesco Mazzoli2012-05-181-347/+379
| | | | | | | | | |
| | | | | | | * | | merge defaultFrancesco Mazzoli2012-05-188-104/+87
| | | | | | | |\ \ \
| | | | | | | * | | | store more info about the cluster on disc, check other nodes before clusteringFrancesco Mazzoli2012-05-154-240/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the `cluster_nodes.config; doesn't store a "config" anymore, but all the information we need about the cluster nodes. This file is updated whenever a new node comes up. Moreover, this file should be *always* present, and it's set up in `rabbit:prepare/0'. Now that we have this file, the various functions regarding the status of the cluster (`all_clustered_nodes/0', `running_clustered_nodes/0;, etc.) can "work" even when mnesia is down (and when the rode is a ram node). Given the assumption that the status file is up to date, with the status of the cluster (before the node went down if the node is down) a lot of operations become easier. I'd like a review at this point, the best thing is probably to diff directly with default since a lot of previous commits are not relevant anymore. The most noticeable changes compared to default: * `join_cluster' works differently. The nodes provided will be used to "discover" the cluster, and are not used to determine whether the node should be ram or not. The node will be a disc node by default, and can be initialized as RAM with the `--ram' flag. The old `cluster' command is preserved, adapted to work with the new functions while preserving similar semantics (we decide on whether the node is disc or not by looking at the list of nodes provided). * `force_cluster' has been removed. * The `join_cluster' operation will fail if: - The node is currently the only disc node of its cluster - We can't connect to any of the nodes provided - The node is currently already clustered with the cluster of the nodes provided * On default restart RAM nodes try to connect to the nodes that were first given by the user, and are not aware of the changes that might have occurred in the cluster when they were online. Since the cluster status is kept updated on disk now, the RAM node will be aware of changes in the cluster when restarted. * Before starting up mnesia, the node contacts the nodes it thinks it's clustered with, and if the nodes are not clustered with the node anymore the startup procedure fail. We fail only when we know for sure that something is wrong - e.g. it won't fail it it doesn't find any online node Things to do: * Implement `uncluster'/`leave_cluster' to kick out a node from a cluster from another node - this is easy. * Implement something like `change_node_type', since given how `join_cluster' works it is not possible right now. * Rewrite the tests regarding to clustering. * Think hard about what can go wrong regarding the cluster status file and the relevant functions. The stuff in `rabbit_upgrade' is particularly worrying, and I need to make sure that things will work when upgrading rabbitmq, by reading old file or upgrading them. * Split `init_db/4' in various functions. We have much stronger assumptions now, for example we should never need to reset or wipe the schema in there. In general it's an ugly function, expecially the optional upgrade part * Probably something else...
| | | | | | | * | | | fix leave_cluster, update rabbit_app.inFrancesco Mazzoli2012-05-143-29/+33
| | | | | | | | | | |
| | | | | | | * | | | change function to find out about cluster nodesFrancesco Mazzoli2012-05-144-55/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See comment above `check_mnesia_running/1' in `rabbit_mnesia'. In short, the function to find out about all/running nodes in the cluster do not work if mnesia is down and the node is a ram node, while we assumed that they would always work. Moreover, the functions to get the cluster disc nodes require mnesia to be up.
| | | | | | | * | | | reseting when clustering, `reset' now disconnects correctlyFrancesco Mazzoli2012-05-112-52/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, I check that we're not joining a cluster we're already in.
| | | | | | | * | | | added `join_cluster', deprecated `cluster, changed the structure of the node ↵Francesco Mazzoli2012-05-113-33/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config
| | | | | | | * | | | remove the bug 24919 stuffFrancesco Mazzoli2012-05-111-15/+0
| | | | | | | | | | |
| | | | | | | * | | | merge bug24919Francesco Mazzoli2012-05-1011-112/+101
| | | | | | | |\ \ \ \
| | | | | | | | * | | | removed `rabbit_mnesia:force_cluster'Francesco Mazzoli2012-05-102-29/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'll also have to remove the `Force' parameter from `init_db', fixing bug 24815.
| | | | | | | | * | | | remove the subscription to the schema tableFrancesco Mazzoli2012-05-101-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since dump_tables won't work with the schema table (and works different to what I had understood anyways) I don't think it's worth it to subscribe to the table, and it's probably better to just modify the config file through rabbit_node_monitor.
| | | | | | | | * | | | dumping schema table on changes in ram nodesFrancesco Mazzoli2012-05-091-0/+19
| | | | | | | | | | | |
| | | | | | | | * | | | merge defaultFrancesco Mazzoli2012-05-092-15/+18
| | | | | | | | |\ \ \ \