YMatrix 5 Minor Version Upgrade

A minor version upgrade refers to upgrading to a new release while keeping the major version number unchanged.
For example: upgrading from 5.0.0 to 5.0.2, or from 5.0.0 to 5.1.0.

This guide details the upgrade process from YMatrix 5.0.0 to 5.1.0. The master node in this example is named mdw.

1 Obtain the Latest Installation Package

Download the 5.1.0 installation package matrixdb5-5.1.0+enterprise-1.el7.x86_64.rpm from the official website and copy it to all cluster nodes.

2 Stop the Cluster

Switch to the mxadmin user: [<user_name>@mdw ~]$ sudo su - mxadmin

Stop the cluster: [mxadmin@mdw ~]$ mxstop -af

3 Stop the Supervisor Service on All Nodes

Run as the root user: ``

systemctl stop matrixdb5.supervisor.service

``

4 Upgrade the RPM Package on All Nodes

Copy the new RPM package to all nodes: ~ scp <local_path> <username>@<server_ip>:<server_path>

Upgrade to the new RPM package as root: ``

yum upgrade -y matrixdb5-5.1.0+community-1.el7.x86_64.rpm

yum reinstall -y matrixdb5-5.1.0+community-1.el7.x86_64.rpm

``

Note!
Do not use yum erase, as it may remove configuration files from the previous version.

Note!
Due to changes in the installation directory structure, after running the upgrade command, you must run reinstall to ensure the installation directories are correctly set.

5 Restart Services on All Nodes

Restart the supervisor service: ``

systemctl start matrixdb5.supervisor.service

``

6 Restart the Cluster on the Master

Switch to the mxadmin user: ``

su - mxadmin

``

Start the cluster: $ mxstart -a

7 Upgrade Plugins (Optional)

If the cluster topology has changed in the new database version (e.g., nodes added or removed), and Grafana monitoring is enabled, log in to the matrixmgr database and upgrade the matrixmgr extension. Then reset the data collection tasks:

`` [mxadmin@mdw ~]$ psql -d matrixmgr

matrixmgr=# ALTER EXTENSION matrixmgr UPDATE; matrixmgr=# SELECT mxmgr_remove_all('local'); matrixmgr=# SELECT mxmgr_deploy('local'); ``