Pgpool Removal#

In version 24.12.0, the Database Connector Role does not exist anymore, therefore the Pgpool software must be removed and Carbonio’s *-db packages must be moved away from the node that features the Database Connector Role. This section presents all the tasks you need to carry out to accomplish the goal.

The procedure is organised in 3 main parts and requires to log in to the Nodes where the Database and Database Connector Roles are installed and execute commands as the root user. The commands are the same on Ubuntu and RHEL operating systems, unless explicitly stated.

Before starting the procedure make sure that:

  • You have SSH or console access to the Database and Database Connector nodes

  • You need to account for some downtime, because Carbonio might lose connection with the PostgreSQL database.

  • You have taken a backup of the Nodes (or the VMs), also because after this procedure you will proceed to upgrade Carbonio

  • Execute each command on the Node that is mentioned

  • You have carefully read the remainder of this section, to have an overview of the procedure and understand all the steps to be carried out

The Database and Database Connector Roles are usually installed on different Nodes, but if they are installed on the same Node, you only need to carry out these two tasks: Disable Pgpool and Restart Services.

Disable Pgpool#

On the Node with the Database Connector Role, execute the following commands to disable pgpool and the corresponding Prometheus exporter.

# systemctl mask pgpool2.service
# systemctl mask carbonio-prometheus-pgpool-exporter.service

Then reconfigure PostgreSQL to change the port it listens to.

# su - postgres -c "psql --command=\"ALTER SYSTEM SET port TO '5432';\""

Install Database Components#

Note

Skip this step if PostgreSQL and Pgpool are installed on the same Node.

On the Node with the Database Role, install all the packages listed.

# apt install carbonio-docs-connector-db carbonio-files-db \
carbonio-mailbox-db carbonio-message-dispatcher-db \
carbonio-ws-collaboration-db carbonio-tasks-db
# dnf install carbonio-docs-connector-db carbonio-files-db \
carbonio-mailbox-db carbonio-message-dispatcher-db \
carbonio-ws-collaboration-db carbonio-tasks-db

Add the services provided by these packages to Carbonio Mesh.

# pending-setups -a

Disable Services#

On the Node with the Database Connector Role, disable all services.

# systemctl disable pgpool2.service
# systemctl disable carbonio-prometheus-pgpool-exporter.service
# systemctl disable carbonio-mailbox-db-sidecar.service
# systemctl disable carbonio-docs-connector-db-sidecar.service
# systemctl disable carbonio-files-db-sidecar.service
# systemctl disable carbonio-message-dispatcher-db-sidecar.service
# systemctl disable carbonio-notification-push-db-sidecar.service
# systemctl disable carbonio-tasks-db-sidecar.service
# systemctl disable carbonio-ws-collaboration-db-sidecar.service

Remove Packages#

On the Node with the Database Connector Role, remove all the packages that are not needed anymore.

Warning

Pay attention to the actual packages that are removed by the following command. If among the packages that are going to be removed there are some packages that are essential for Carbonio, do not remove any packages.

# apt remove pgpool carbonio-docs-connector-db \
carbonio-files-db carbonio-mailbox-db \
carbonio-message-dispatcher-db \
carbonio-notification-push-db carbonio-ws-collaboration-db \
carbonio-prometheus-pgpool-exporter
# dnf remove pgpool-II carbonio-docs-connector-db \
carbonio-files-db carbonio-mailbox-db \
carbonio-message-dispatcher-db \
carbonio-notification-push-db carbonio-ws-collaboration-db \
carbonio-prometheus-pgpool-exporter

Restart Services#

The last task is to restart all services.

As the zextras user, execute

zextras$ zmcontrol restart

As the zextras user, execute

zextras$ zmcontrol restart

As the user user, execute on each Node one or more of the following commands.

Hint

If the command fails, it means that on the Node that target does not exist, so disregard any error message.

# systemctl restart carbonio-directory-server.target
# systemctl restart carbonio-appserver.target
# systemctl restart carbonio-mta.target
# systemctl restart carbonio-proxy.target

Final Checks#

To make sure that Carbonio Mesh was correctly updated and notified that the DB components have been moved to a different node, you can check from the Carbonio Mesh Administration Interface whether the services are reportedly running on the correct node.