-
Notifications
You must be signed in to change notification settings - Fork 428
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
Configuration reload #296
Merged
Merged
Configuration reload #296
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* improve error reporting * backup old config files * ignore some changes, which don't require restart like acl
restart only listeners that have changed
The commands that are now available in the mongooseimctl are: * reload_local * reload_cluster. The commit also removes making backups of existing config files introduces some refactorings.
Now all the client connections associated with a domain to be removed are closed. Additionally, a config file on each node is compared to the one on the initiating node. The whole cluster reload mechanism works as follows: 1. Parse the configuration file on the initiating node. 2. Compute a diff between current configuration and the one read from the provided file 3. Compute a hash of the current node's configuration (config version) 4. Compute a hash of the new configuration read from file (file version) 5. Apply new configuration on the current node 6. Send configuration diff computed on the initiating node to other nodes along with the config version, file version and the file path 7. Compute config version and file version (after parsing it) on the other nodes and verify that they match their counterparts from the initiating node; if any doesn't match cancel the operation 8. Apply the configuration diff on the other nodes
(cherry picked from commit 985b1f271cd7210955b7cee02311bf0b499048ba)
(cherry picked from commit 4a4f583abafd8e9d72eb65c1220a51a9d7b0dd29)
(cherry picked from commit e604ff204b41d0b36d3e6a8a375b5c0d67b7c290) (cherry picked from commit bc8b07b6f78ea54e78f04f432da2b74c439dfe11)
`reload_local` (hence `reload_cluster` too) was not idempotent. This was caused by lame implementation of stopping a module, which left a placeholder in the database instead of properly cleaning up after removing the last module for a given (cherry picked from commit 745eb2f786483ce011fccff0f4d9c285dc0fe1a6) (cherry picked from commit 31aeaa86cbf5feec64549abcc5411cdec5eb4509)
(cherry picked from commit 45195c361c2ba659045a588aff8737a60669c553)
(cherry picked from commit e39f7dec35810f97a7809afb869bf745fabd5d8e)
(cherry picked from commit b9c1a2a6a6d2785742a774cb008b09a117b3d4d9)
(cherry picked from commit 9025dcc4357b19d9c739224b32e42ef7ba7eb732)
(cherry picked from commit 01db9c58e88a671ef00442f9881aef08d00d93af)
(cherry picked from commit 48b09820a2092fb1678c0a2ef990b093b264b16a)
(cherry picked from commit 8acf730866e319da1a7d24a3f1fcbe38c4fe05e0)
(cherry picked from commit 7f513a5c3dfc0d9f1ef63ffa65283eb3c7fbe110)
(cherry picked from commit 9f7989923697d2877cd3a800b999c0b2070ff531)
(cherry picked from commit c77910d446a9e09aecab82e56d4d4134f05b00a1)
(cherry picked from commit 8b5e9f31a82007abfe9259d8ae75596fb54bd0ac)
Without this change, when doing application:start(ejabberd) the call sometimes (non-deterministically!) returned undefined. This lead to trying a different (non-existent) config file and failing the add_a_module test case. (cherry picked from commit e8a8f84b2f6a0fe2702677ea2295c4a0c4a7b84f)
(cherry picked from commit 3634ac60c81eb57e14fb5a0576542b2fa4cb7405)
(cherry picked from commit 46da2b6994c7041abaa345dddafcceae02a81d60)
(cherry picked from commit 295b0b1e934f44298cd8f824613914e3ddab6cc9)
(cherry picked from commit 0b7e723fbad21d545b249be7e2b347d72288cd33)
(cherry picked from commit 6c206f92b1477bfc929d3a49827e38dc1cf1bda2)
(cherry picked from commit 90541228e91324eb48f589032ca5b0ee5915adac)
(cherry picked from commit 713cf67ecf520b48a57ee32a81f633d74ff4f612)
(cherry picked from commit 168b697f9a99516b8d79de7092ddc2bb00ea1b94)
(cherry picked from commit b501c0b486a08b0e72d6594cb14675bddf12beb4) Conflicts: rebar.config rel/reltool.config
travis is using test branch |
studzien
force-pushed
the
conf-reload
branch
8 times, most recently
from
October 17, 2014 08:42
389c515
to
f53fe79
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.