Skip to content

Commit cf03687

Browse files
authored
Merge pull request #3904 from vespa-engine/vekterli/add-maintenance-mode-to-ops-procedure
Add use of maintenance mode to admin procedure documentation
2 parents 763ae73 + e5ac053 commit cf03687

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

en/operations-selfhosted/admin-procedures.html

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,32 @@ <h2 id="vespa-start-stop-restart">Vespa start / stop / restart</h2>
4949
See <a href="multinode-systems.html#aws-ec2">multinode</a> for <em>systemd</em> /<em>systemctl</em> examples.
5050
<a href="/en/operations-selfhosted/docker-containers.html">Docker containers</a> has relevant start/stop information, too.
5151
</p>
52-
53-
52+
<h3 id="content-node-maintenance-mode">Content node maintenance mode</h3>
53+
<p>
54+
When stopping a content node <em>temporarily</em> (e.g. for a software upgrade), consider manually setting the node into
55+
<a href="../reference/cluster-v2.html#maintenance">maintenance mode</a> <em>before</em> stopping the node to prevent
56+
automatic redistribution of data while the node is down. Maintenance mode must be manually removed once the node has
57+
come back online. See also: <a href="#cluster-state">cluster state</a>.
58+
</p>
59+
<p>
60+
Example of setting a node with <a href="../reference/services-content.html#node">distribution key</a> 42 into
61+
<code>maintenance</code> mode using <a href="vespa-cmdline-tools.html#vespa-set-node-state">vespa-set-node-state</a>,
62+
additionally supplying a reason that will be recorded by the cluster controller:
63+
</p>
64+
<pre>
65+
$ vespa-set-node-state --type storage --index 42 maintenance "rebooting for software upgrade"
66+
</pre>
67+
<p>
68+
After the node has come back online, clear maintenance mode by marking the node as <code>up</code>:
69+
</p>
70+
<pre>
71+
$ vespa-set-node-state --type storage --index 42 up
72+
</pre>
73+
<p>
74+
Note that if the above commands are executed <em>locally</em> on the host running the services for node 42,
75+
<code>--index 42</code> can be omitted; <code>vespa-set-node-state</code> will use the distribution key of
76+
the local node if no <code>--index</code> has been explicitly specified.
77+
</p>
5478

5579
<h2 id="system-status">System status</h2>
5680
<ul>

0 commit comments

Comments
 (0)