Skip to content

Commit 6414872

Browse files
committed
DOC-5617 RS: Added rladmin commands to change node roles
1 parent 70887cd commit 6414872

File tree

1 file changed

+62
-5
lines changed

1 file changed

+62
-5
lines changed

content/operate/rs/clusters/change-node-role.md

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ A Redis Software cluster contains a primary node, which coordinates cluster-wide
1414

1515
## Demote primary node
1616

17+
{{< multitabs id="demote-node"
18+
tab1="Cluster Manager UI"
19+
tab2="rladmin" >}}
20+
1721
To demote the primary node to a secondary node using the Cluster Manager UI:
1822

19-
1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
23+
1. On the **Nodes** screen, click <img src="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline"> for the primary node you want to demote.
2024

21-
{{<image filename="images/rs/screenshots/nodes/primary-node-more-actions.png" alt="Click the more actions button for a node to access node actions.">}}
25+
<img src="../../../../images/rs/screenshots/nodes/primary-node-more-actions.png" alt="Click the more actions button for a node to access node actions.">
2226

2327
1. Select **Set as a secondary node** from the list.
2428

@@ -28,20 +32,73 @@ To demote the primary node to a secondary node using the Cluster Manager UI:
2832

2933
- **Choose specific node**: You can manually select which node becomes the new primary node.
3034

31-
{{<image filename="images/rs/screenshots/nodes/primary-node-set-as-secondary-dialog.png" alt="The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.">}}
35+
<img src="../../../../images/rs/screenshots/nodes/primary-node-set-as-secondary-dialog.png" alt="The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.">
3236

3337
1. Click **Confirm**.
3438

39+
-tab-sep-
40+
41+
To demote the primary node to a secondary node using `rladmin`:
42+
43+
1. Identify the primary node's ID with [`rladmin cluster master`]({{<relref "/operate/rs/references/cli-utilities/rladmin/cluster/master">}}):
44+
45+
```sh
46+
$ rladmin cluster master
47+
Node <primary-node-id> is the cluster master node
48+
```
49+
50+
1. Run [`rladmin node enslave`]({{<relref "/operate/rs/references/cli-utilities/rladmin/node/enslave/#node-enslave">}}) with the `demote_node` option:
51+
52+
```sh
53+
rladmin node <primary-node-ID> enslave demote_node
54+
```
55+
56+
Replace `<primary-node-ID>` with the ID returned by `rladmin cluster master`.
57+
58+
{{< /multitabs >}}
59+
3560
## Promote secondary node
3661

62+
{{< multitabs id="promote-node"
63+
tab1="Cluster Manager UI"
64+
tab2="rladmin" >}}
65+
3766
To promote a secondary node to become the primary node using the Cluster Manager UI:
3867

39-
1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
68+
1. On the **Nodes** screen, click <img src="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline"> for the secondary node you want to promote.
4069

41-
{{<image filename="images/rs/screenshots/nodes/secondary-nodes-more-actions.png" alt="Click the more actions button for a node to access node actions.">}}
70+
<img src="../../../../images/rs/screenshots/nodes/secondary-nodes-more-actions.png" alt="Click the more actions button for a node to access node actions.">
4271

4372
1. Select **Set as the primary node** from the list.
4473

4574
1. Click **Confirm**.
4675

76+
77+
-tab-sep-
78+
79+
To promote a secondary node to become the primary node using `rladmin`:
80+
81+
1. To find the IDs of secondary nodes, run [`rladmin status nodes`]({{<relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes">}}):
82+
83+
```sh
84+
$ rladmin status nodes
85+
CLUSTER NODES:
86+
NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS
87+
node:1 master 198.51.100.2 3d99db1fdf4b 4/100 6 14.74GB/19.54GB 10.73GB/16.02GB 7.22.0-250 OK
88+
*node:3 slave 198.51.100.4 b87cc06c830f 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK
89+
node:2 slave 198.51.100.3 fc7a3d332458 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK
90+
```
91+
92+
Nodes with the `slave` role are secondary nodes.
93+
94+
1. Run [`rladmin cluster master set`]({{<relref "/operate/rs/references/cli-utilities/rladmin/cluster/master">}}):
95+
96+
```sh
97+
rladmin cluster master set <secondary-node-ID>
98+
```
99+
100+
Replace `<secondary-node-ID>` with the ID of the secondary node you want to promote.
101+
102+
{{< /multitabs >}}
103+
47104
After this node becomes the primary node, all cluster management traffic is directed to it.

0 commit comments

Comments
 (0)