Upgrade a Confluence cluster through the API without downtime

This document provides guidance on how to initiate and finalize a rolling upgrade through API calls. This upgrade method is suitable for admins with the skills and automation tools to orchestrate maintenance tasks (like upgrades).

Unable to render {include} The included page could not be found.

API reference

The entire rolling upgrade process is governed by the following API:

http://<host>:<port>/rest/zdu/cluster/zdu/

This API has the following calls:

Get an overview of the cluster's status.
Enable upgrade mode.
Get the status of the cluster. 
Get an overview of a node's status, including the number of running tasks.
Disable upgrade mode. You can only use this call if the upgrade progress is not MIXED.
Once all nodes are upgraded, finalize the rolling upgrade. This will automatically disable upgrade mode.

For detailed information about each API call, see Confluence REST API Documentation.

Initiating a rolling upgrade

To initiate a rolling upgrade, enable rolling upgrade first. To do this, use:

http://<host>:<port>/rest/zdu/cluster/zdu/start

Unable to render {include} The included page could not be found.

Upgrading each node individually

Before you upgrade a node, you'll need to gracefully shut down Confluence on it. To do this, run the stop script corresponding to your operating system and configuration. Learn more about graceful Confluence shutdowns.

For example, if you installed Confluence as a service on Linux, run the following command:

$ sudo /etc/init.d/confluence stop

After upgrading Confluence on the node, wait for it to transition to an Active status first before upgrading another node.

Node statuses

To get the status of a node, use:

http://<host>:<port>/rest/zdu/cluster/zdu/nodes/<nodeID>

ACTIVEConfluence is connected to the cluster and running with no errors. 
STARTINGConfluence is still loading, and should transition to Active once finished.
TERMINATINGConfluence was gracefully shut down, and should transition to Offline once finished.
OFFLINEConfluence is not responding on the node. This node will be removed from the cluster completely if it is still offline after Upgrade mode is disabled.
ERRORSomething went wrong with Confluence on the node.

Cluster statuses

To get the status of the cluster, use:

http://<host>:<port>/rest/zdu/cluster/zdu/state

STABLEYou can turn on Upgrade mode now. 
READY_TO_UPGRADE

Upgrade mode is enabled, but no nodes have been upgraded yet. You can start upgrading your first node now. 

MIXEDAt least one node is upgraded, but you haven't finished upgrading all nodes yet. Your cluster has nodes running different Confluence versions. You need to upgrade all nodes to the same bug fix version to transition to the next status (READY_TO_RUN_UPGRADE_TASKS).
READY_TO_RUN_UPGRADE_TASKS

All nodes have node been upgraded. You can now finalize the rolling upgrade:

http://<host>:<port>/rest/zdu/cluster/zdu/approve

Enable and disable Upgrade mode

Unable to render {include} The included page could not be found.

Troubleshooting

Node errors during rolling upgrade

Unable to render {include} The included page could not be found.

Disconnecting a node from the cluster through the load balancer

Unable to render {include} The included page could not be found.

Traffic is disproportionately distributed during or after upgrade

Unable to render {include} The included page could not be found.

Node won't start up 

Unable to render {include} The included page could not be found.

Last modified on Nov 3, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.