YMatrix 6 small version upgrade

Small version upgrade refers to upgrading to a new version under the premise that the main version number remains unchanged. For example: upgrade from 6.0.0 to 6.0.2; upgrade from 6.0.0 to 6.1.0.

Below, take the example of upgrading from YMatrix 6.0.0 to 6.1.0 to introduce the detailed steps. In the example, the master node name is mdw.

1 Get the latest installation package

Obtain the 6.1.0 installation package from the official website and copy it to all nodes in the cluster.

Copy the new RPM package to all nodes.

~ scp <local path> <username>@<server IP address>: <server path>

2 Stop the cluster

Switch to mxadmin user.

[mxadmin@mdw ~]$ sudo su - mxadmin

Stop the cluster.

[mxadmin@mdw ~]$ mxstop -af

3 Stop the supervisor service on all nodes

Use the root user to execute:

$ sudo systemctl stop matrixdb6.supervisor.service

4 Upgrade RPM packages on all nodes

Upgrade to a new RPM package using root user:

$ sudo yum upgrade -y matrixdb6-6.1.0+community-1.el7.x86_64.rpm
$ sudo yum reinstall -y matrixdb6-6.1.0+community-1.el7.x86_64.rpm

Notes!
Do not use yum erase, otherwise the configuration of the previous version will be deleted.

Notes!
Due to changes in the installation directory structure, be sure to execute the reinstall command once after the upgrade command to ensure that the installation directory is correct.

5 Restart the service on all nodes

$ sudo systemctl start matrixdb6.supervisor.service

6 Restart the cluster on Master

Switch to mxadmin user:

$ su - mxadmin

Start the cluster:

$ mxstart -a

7 Upgrade plug-in (optional)

If the cluster topology has changed (added or decreased servers) in the new version of the database and Grafana monitoring is used in the cluster, then you need to log in to the matrixmgr database to upgrade the matrixmgr plug-in and reset the acquisition task:

[mxadmin@mdw ~]$ psql -d matrixmgr

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