Skip to content

KR.ADMIN SET-MEMBER-STATUS

Overrides the status of a cluster member.

KR.ADMIN SET-MEMBER-STATUS <member-id> <status>
ParameterTypeDescription
member-idstringFull 40-character hex member ID or a 4-character prefix. A prefix is resolved against currently registered members.
statusstringTarget status. One of RUNNING, UNAVAILABLE, STOPPED, UNKNOWN. Case-insensitive.

Simple string. Returns OK on success.

Updates the status of the specified member and notifies the cluster so that other members observe the change promptly.

Typical workflow: set a member to STOPPED before calling REMOVE-MEMBER to cleanly decommission it.

ErrorCondition
ERR cluster has not been initialized yetThe cluster must be initialized first.
ERR Invalid number of parametersThe wrong number of arguments was supplied.
ERR Invalid member status <value>The value does not match any valid status.
ERR Member: <member-id> not registeredNo member with the given ID exists in the cluster.
ERR Member: <member-id> not registered properlyThe member exists but its record is incomplete.
ERR Invalid memberId: <id>The value is not a valid member ID and is not exactly 4 characters long.
ERR no member found with prefix: <prefix>No registered member ID starts with the given 4-character prefix.
ERR more than one member found with prefix: <prefix>The 4-character prefix is ambiguous.

Mark a member as STOPPED:

127.0.0.1:3320> KR.ADMIN SET-MEMBER-STATUS 006cdc459c59e600c76494e8388857fc3cba2fa8 STOPPED
OK

Using a 4-character prefix:

127.0.0.1:3320> KR.ADMIN SET-MEMBER-STATUS 006c STOPPED
OK

Invalid status:

127.0.0.1:3320> KR.ADMIN SET-MEMBER-STATUS 006cdc459c59e600c76494e8388857fc3cba2fa8 some-status
(error) ERR Invalid member status some-status

Member not found:

127.0.0.1:3320> KR.ADMIN SET-MEMBER-STATUS a3f18b2e74d9c5601f82e4a7b390d612c8f7e149 RUNNING
(error) ERR Member: a3f18b2e74d9c5601f82e4a7b390d612c8f7e149 not registered