DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
- Limited Accessibility: The node executing the tool must have direct access to the metadata path of the node being added or removed. This restricts the ability to use node A to manage node B, as node A may not have access to the metadata folder on node B.
Dependency on Node Configuration: The tool requires access to the configuration of the node being managed.
However, the essential information for these operations — the directory UUID and endpoints — is already available from the active controller’s in-memory state and the ClusterImage.
Leveraging these sources allows us to simplify voter addition and removal, enabling the command to run without direct access to the target node’s metadata directory.
Public Interfaces
CLI
Adding a controller
...
Proposed Changes
Server side changes
- During
AddRaftVoterRequesthandling, if api version >= 2,- the voter directory id is derived from in-memory
LeaderStatewhen the value is Uuid.ZERO_UUID, - the controller endpoints are derived from
ClusterImageif endpoint set is empty, note that the ClusterImage may lag behind actual state, so endpoints are not strictly idempotent.
- the voter directory id is derived from in-memory
During
AddRaftVoterRequesthanding, if multiple observers share the same node ID, reject withIllegalStateExceptionindicating the duplicate node ID and instruct the user to resolve the conflict.- During
RemoveRaftVoterRequesthanding, if api version >=1, the voter directory id is derived from in-memoryLeaderStatewhen the value is Uuid.ZERO_UUID.
...
- Two convenience methods for adding and removing controllers have been introduced in
Admin.java, addRaftVoter documented with Javadoc warnings about idempotency risks, and are intended for use only when the user understands and accepts those risks.
...
Integration tests will be added for the two new methods in Admin.java.
Rejected Alternatives
- Deprecate
—-command-configoption inadd-controllerand--controller-directory-idoption inremove-controller.The main reason not to deprecate these two parameters is that they were only just introduced in 4.0, so deprecating them in a 4.x release feels a bit too soon. Also, the
--command-configcan be used in a different user scenario, where the user can still provide the configuration file toadd-controllerif they already have it locally. Using admin APIs to retrieve directory UUID and controller endpoints, but this brings extra network communication overhead.
- The
Admin#describeMetadataQuorummethod can provide the directory UUID. The
Admin#describeConfigsmethod, utilizing thebootstrap.controlleraddress, can be used to retrieve the necessary endpoints.
- The