OF-3181: Allow static configuration of cluster node ID#3141
Open
guusdk wants to merge 1 commit intoigniterealtime:mainfrom
Open
OF-3181: Allow static configuration of cluster node ID#3141guusdk wants to merge 1 commit intoigniterealtime:mainfrom
guusdk wants to merge 1 commit intoigniterealtime:mainfrom
Conversation
Previously, an Openfire server generated a new cluster node ID on every startup, causing the identifier to change after each restart. This commit ensures that a server reuses the same node ID over time by persisting the initially generated value. The node ID is now stored in `openfire.xml` under a new property: `clustering.nodeid` - If the property does not exist at startup, a random node ID is generated and persisted. - If the property exists, its value is reused. This allows administrators to optionally define stable, human-recognizable node IDs. When doing so, administrators are responsible for ensuring uniqueness across all cluster members. This change also removes the concept of a "default" node ID. Since Openfire 4.4.0 (OF-1705), node IDs no longer change when joining a cluster, making the distinction between default and runtime IDs obsolete. As a result, there is now a single node ID per server. As a functional consequence, the node ID is no longer available until after server initialization (it is no longer a static field). This is expected to have little to no practical impact, as the previous static value was not publicly accessible.
Member
Author
|
A related improvement to the Hazelcast plugin is in igniterealtime/openfire-hazelcast-plugin#124 - it helps to guard against using the same node ID value for more than one server in the cluster. |
This file contains hidden or 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
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.
Previously, an Openfire server generated a new cluster node ID on every startup, causing the identifier to change after each restart. This commit ensures that a server reuses the same node ID over time by persisting the initially generated value.
The node ID is now stored in
openfire.xmlunder a new property:clustering.nodeidThis allows administrators to optionally define stable, human-recognizable node IDs. When doing so, administrators are responsible for ensuring uniqueness across all cluster members.
This change also removes the concept of a "default" node ID. Since Openfire 4.4.0 (OF-1705), node IDs no longer change when joining a cluster, making the distinction between default and runtime IDs obsolete. As a result, there is now a single node ID per server.
As a functional consequence, the node ID is no longer available until after server initialization (it is no longer a static field). This is expected to have little to no practical impact, as the previous static value was not publicly accessible.