|
1 | 1 | # Shutting Down a Node |
2 | 2 |
|
3 | | -When a node registers for an epoch, it is committing to being available |
4 | | -to service requests for the entire epoch. Due to this availability |
5 | | -commitment, validator and non-client paratime nodes must be shutdown |
| 3 | +Depending on the role (e.g. validator), a node may periodically register itself |
| 4 | +to the consensus registry, committing itself to serve requests until the |
| 5 | +expiration epoch. Due to this availability commitment, nodes must be shutdown |
6 | 6 | gracefully to avoid network disruption. |
7 | 7 |
|
8 | | -The graceful shutdown process involves the following steps: |
| 8 | +To have the node gracefully shutdown: |
9 | 9 |
|
10 | 10 | 1. Ensure your service manager (e.g. systemd) will not restart the node after |
11 | 11 | exit. Otherwise the node may re-register on startup and you will need to wait |
12 | | - another epoch for it to expire. |
13 | | -2. Halt the automatic re-registration. |
14 | | -3. Wait for the node's existing registration to expire. |
15 | | -4. Terminate the node binary. |
16 | | - |
17 | | -To have the node gracefully shutdown, run: |
| 12 | + again. |
| 13 | +2. Run one of the commands below: |
18 | 14 |
|
19 | 15 | ```bash |
20 | 16 | # Issue a graceful shutdown request. |
21 | 17 | oasis-node control shutdown |
22 | 18 |
|
23 | 19 | # Issue a graceful shutdown request, and block until the node terminates. |
24 | | -# Note: This can take up to a full epoch to complete. |
| 20 | +# Note: This can take up to 3 full epochs to complete, because the node |
| 21 | +# registers each epoch for the next 2 epochs (inclusive). |
25 | 22 | oasis-node control shutdown \ |
26 | 23 | --wait |
27 | | -```` |
| 24 | +``` |
| 25 | + |
| 26 | +Internally, the command will halt the automatic re-registration, wait for the |
| 27 | +node's existing registration to expire and terminate the node binary. If the |
| 28 | +node is not registered (e.g. non-validator or paratime client node) this command |
| 29 | +will immediately terminate the node binary. |
28 | 30 |
|
29 | 31 | :::caution |
30 | 32 |
|
|
0 commit comments