Skip to main content

Updates

staxmax updates the whole cluster from the web UI, one node at a time. VMs keep running throughout, and no failover happens.

The Updates section is on the Updates tab of the Settings page.

How an update runs​

The node you start the update from downloads the release once. Then, for each other node in turn, it copies the release there, restarts staxmaxd on it, and waits until it is back on the new version and hears every node before moving on. The node serving the page goes last, so the page may lose its connection for a moment then; the Settings page reloads into the new version on its own. If a node fails its checks, it goes back to the version it had and the update stops there, and the An update failed alarm is raised (see Alarms).

Releases are signed. A node only installs a release signed by a key it trusts.

From 0.2.20 on, nodes prove who they are to each other with their own certificates. Once every node runs 0.2.20 or later and no update is under way, they stop accepting calls without one (the activity log says so), and from then on an update to a release older than 0.2.20 is refused.

The node list​

The section lists each node with its version. Offline marks a node that can't be updated now. Not updatable marks a node installed without the staxmax installer (.run): run the .run on it once, with sudo sh ./staxmax-<version>-linux-x64.run. It keeps the node's setup, VMs and settings.

If the nodes run different versions, the section says so. Install the newest on every node to bring them in line.

Update by hand​

staxmax checks for new releases on its own, a minute after it starts and then at most once an hour (30 minutes after a failed check). Check now checks right away; the section then says Up to date with the time of the last check, or offers the new release.

  1. Under staxmax version, read the release notes.
  2. Click Update every node, then confirm.

The section shows the progress under Updating to version: the download, then each node as Waiting, Copying, Installing, Updated or Failed. It ends with Updated every node to version or The update to version stopped.

An update can't start while a node is offline or not updatable, another update is running, this node is taking over VMs, or the cluster is not healthy. The reason shows under the button.

Automatic updates​

  1. Tick Install updates automatically.
  2. Set the window: Between and And (03:00 and 05:00 by default). A window can wrap past midnight; one that starts and ends at the same time allows any time of day.
  3. Click Save.

An update offered by the release server then starts by itself inside the window, and is marked automatic. It is started by the first node in the cluster that is online, so the window is in that node's local time. The window only limits when an update starts; one that has started finishes.

An automatic update that fails is not tried again for that release until you click Save here again. A newer release is tried as usual.

Install from a file​

For a site without internet:

  1. Open Install from a file.
  2. Choose the Release (.run) and its Signature (.run.sig).
  3. Click Upload.

The release is kept only if it is signed by a key this node trusts, and only if the node's license allows it: a node whose license is suspended or revoked accepts none (see License). It then shows as uploaded, with Update every node, which installs it on every node as above.

System updates​

This is separate from staxmax's own releases. Ubuntu and Debian install their security updates on their own every night, and a node keeps doing that. staxmax adjusts two things so this does not disturb the cluster:

  • Each node gets its own hour. Nodes install system updates between 01:00 and 06:00 local time, each in a different hour by its place in the cluster (up to 15 minutes later, at random), so no two nodes are busy with them at once. A cluster of more than six nodes shares the hours.
  • Incus and staxmaxd are not restarted by a package update. Otherwise Incus would be restarted after every update, which cuts off the copies between nodes. A restart of the node renews both; staxmaxd is also restarted by its own updates.

Both are files staxmaxd writes on each node (see Ports and files).

When an update needs a restart​

Some updates, usually a new kernel, only take effect once the node restarts. The node's card on Nodes then says A system update is installed and takes effect once node restarts, with the day it has waited since. Nothing is restarted for you.

  1. Click Maintenance in the notice, then Move its VMs off. See Maintenance mode.
  2. When the node runs nothing, click Restart now on its card, then confirm.
  3. When it is back online, click End maintenance and move them back.

Do one node at a time. This way the VMs keep running throughout.

Restart all nodes at once​

If the VMs can be off for a few minutes, restarting every node together is quicker. While a node waits for a restart, a notice at the top of Nodes says how many do, with the Restart all nodes button.

  1. Click Restart all nodes. The dialog says how many VMs and containers are running now and will be shut down.
  2. Confirm with Stop everything and restart (Restart when nothing is running).

All nodes shut down and restart at the same time. Nothing is moved and nothing keeps running: each node's shutdown stops its VMs and containers cleanly, and once the nodes are back, each starts the ones it owns that are set to run, as after a power cut. This usually takes a few minutes, and the page stops answering until then. The events show Restarting every node, as asked from the dashboard and, afterwards, Every node is back after the restart.

Nodes come back at different speeds, so no node takes over another's VMs until every node answers again. A node that has not come back 10 minutes after the request is treated as failed, and its protected VMs are then taken over as usual (see Failover). Until then a slower node is expected to be away, so no A node is offline alarm is raised or sent for it, and none for the VM copies it keeps; after the 10 minutes it is reported offline like any other failed node.

Every node must be online: the button is greyed out while one is offline. The restart is also refused while a staxmax update is being installed, while VMs are still moving for maintenance, or while a node runs a staxmax version from before this feature (update every node first).

On a single node there is no maintenance mode. The notice there offers Restart this node, which restarts it the same way: its VMs are shut down and start again when it is back.

A restart that has waited more than two weeks raises the A node has waited long for a restart alarm (see Alarms). It clears when the node has restarted.