Upgrade to Carbonio CE 24.7.1#

Carbonio CE does not have any installer: whenever new versions are released, the Zextras repositories are updated and packages are available for installation along with the other system updates. Therefore, the upgrade procedure is usually a very quick activity, carried out by means of a few commands to be executed on each Node, be it the (single) Node in a Single-Server installation, or all the Nodes in a Multi-Server installation.

Supported Versions

Only the three previous versions (so, in case of 24.7.1, all from 24.1.0 included) are supported by this upgrade procedure. If you try to upgrade from older version, you might be required to run some tasks manually, including for example, edit configuration files, manually remove packages or resolve package conflicts, and so on and so forth.

The upgrade procedure is the same, regardless of the currently installed version of Carbonio CE. The difference is that if you upgrade from 24.5.0, you usually do not need to carry out any other task manually, while if you upgrade from any older supported version, you will probably need to run some task before, during, or after the upgrade procedure.

Before proceeding to the upgrade, if you upgrade from 24.5.0, please read carefully section Upgrade from 24.5.0; otherwise, please read section Upgrade from Older Supported Versions.

Hint

For improved security, to prevent any data loss, it is suggested to make a backup or take a snapshot (if you are using an hypervisor) of each Node before upgrading.

Upgrade Nodes#

Preliminary Tasks

As a preliminary task, we backup the LDAP data of the Directory Server. On a Multi-Server installation, execute the following commands on the node with the Directory Server Role installed.

  1. Make a dump of the LDAP Database, especially if the if the upgrade includes the Directory Server. This can be done using the command (as the zextras user)

    zextras$ /opt/zextras/libexec/zmslapcat /tmp
    

    Note

    The dump will be saved in the /tmp/ directory, so make sure to copy it to a safe location.

  2. Make a backup copy of file /opt/zextras/conf/localconfig.xml and store it in a safe place

If you are on a Multi-Server, remember to start from the node featuring the Directory Server Role, then all the other in the same order of installation.

Step 1. Stop services

As the zextras user, run:

zextras$ zmcontrol stop
Step 2. Clean cached package list and information
# apt clean
# dnf clean all
Step 3. Update package list and install upgrades
# apt update && apt upgrade
# dnf upgrade --best --allowerasing
Step 4. Register upgraded packages to Carbonio Mesh
# pending-setups -a
Step 5. Reboot

Once the upgrade has completed successfully, run command:

# reboot

Upgrade from 24.5.0#

Requirements & Preliminaries#

This upgrade procedure requires that PostgreSQL 16 be installed. If you did not yet upgrade it, please refer to Section PostgreSQL 16 Upgrade.

Known Issues#

After the upgrade to 24.7.1, the Carbonio Admin Panel will still report the version of Carbonio CE to be 24.7.0. However, the CLI zmcontrol -v will report the correct version (24.7.1).

Upgrade from Older Supported Versions#

If you plan to upgrade from a version more recent than 24.1.0 included, you may encounter issues or need to carry out tasks or command that are reported in Section Known Issues (Older Releases).

Requirements & Preliminaries#

This upgrade procedure requires that PostgreSQL 16 be installed. If you did not yet upgrade it, please refer to Section PostgreSQL 16 Upgrade.

Known Issues (Older Releases)#

During the upgrade from an older version, you may encounter one or more of the following issues that require a manual intervention.

Additionally, after the upgrade to 24.7.1, the Carbonio Admin Panel will still report the version of Carbonio CE to be 24.7.0. However, the CLI zmcontrol -v will report the correct version (24.7.1).

GPG Key of Grafana in Ubuntu 22.04

If you migrate from Ubuntu 20.04 to 22.04 and use Monitoring Role’s Grafana, you need to update the location on which its GPG key is stored to prevent warning during upgrades. Log in to the Node on which the Carbonio Monitoring Role is installed and execute the following commands.

  • Remove existent repository

    # add-apt-repository -r "deb https://packages.grafana.com/oss/deb
    stable main"
    
  • Retrieve GPG key

    # wget -q -O - https://packages.grafana.com/gpg.key | \
    gpg --dearmor | sudo tee /usr/share/keyrings/grafana.gpg > \
    /dev/null
    
  • Add repository

    # echo "deb [signed-by=/usr/share/keyrings/grafana.gpg] \
    https://packages.grafana.com/oss/deb stable main" | sudo tee -a \
    /etc/apt/sources.list.d/grafana.list
    
Carbonio Monitoring

While upgrading the carbonio-prometheus package, you will be prompted with the following text:

Configuration file '/etc/carbonio/carbonio-prometheus/prometheus.yml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ?  Your options are:
Y or I  : install the package maintainer's version
N or O  : keep your currently-installed version

You must replace the existing file with the new one, therefore answer Y or I.

Carbonio Workstream Collaboration

After the upgrade you need to reinitialise the message dispatcher. As the root user execute the command

# PGPASSWORD=$DB_ADM_PWD carbonio-message-dispatcher-migration carbonio_adm 127.78.0.10 20000

Then restart the service

# systemctl restart carbonio-message-dispatcher
Postgresql Upgrade Issue

During the upgrade of PostgreSQL, an error might be raised in case the existent databases have been created with older version of libc:

2024-03-19 12:28:14.209 UTC [909825] HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE activesync REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
2024-03-19 12:28:19.669 UTC [909915] WARNING:  database "abq" has a collation version mismatch

In case you find in the log some messages similar to the one shown above, you need to recreate the collation and indexes of the databases using the following commands.

First, become the postgres user

# su - postgres

Then issue these two commands

$ psql -d abq -c "REINDEX DATABASE abq"
$ psql -d abq -c "ALTER DATABASE abq REFRESH COLLATION VERSION;"

These commands should probably be given for each of the databases, so you can copy & paste all the following commands:

psql -d abq -c "REINDEX DATABASE abq"
psql -d abq -c "ALTER DATABASE abq REFRESH COLLATION VERSION;"
psql -d powerstore -c "REINDEX DATABASE powerstore"
psql -d powerstore -c "ALTER DATABASE powerstore REFRESH COLLATION VERSION;"
psql -d activesync -c "REINDEX DATABASE activesync"
psql -d activesync -c "ALTER DATABASE activesync REFRESH COLLATION VERSION;"
psql -d auth -c "REINDEX DATABASE auth"
psql -d auth -c "ALTER DATABASE auth REFRESH COLLATION VERSION;"
psql -d "carbonio-docs-connector-db" -c "REINDEX DATABASE \"carbonio-docs-connector-db\""
psql -d "carbonio-docs-connector-db" -c "ALTER DATABASE \"carbonio-docs-connector-db\" REFRESH COLLATION VERSION;"
psql -d "carbonio-files-db" -c "REINDEX DATABASE \"carbonio-files-db\""
psql -d "carbonio-files-db" -c "ALTER DATABASE \"carbonio-files-db\" REFRESH COLLATION VERSION;"
psql -d carbonio_adm -c "REINDEX DATABASE carbonio_adm"
psql -d carbonio_adm -c "ALTER DATABASE carbonio_adm REFRESH COLLATION VERSION;"
psql -d core -c "REINDEX DATABASE core"
psql -d core -c "ALTER DATABASE core REFRESH COLLATION VERSION;"
psql -d ha -c "REINDEX DATABASE ha"
psql -d ha -c "ALTER DATABASE ha REFRESH COLLATION VERSION;"
psql -d postgres -c "REINDEX DATABASE postgres"
psql -d postgres -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;"
psql -d template0 -c "REINDEX DATABASE template0"
psql -d template0 -c "ALTER DATABASE template0 REFRESH COLLATION VERSION;"
psql -d template1 -c "REINDEX DATABASE template1"
psql -d template1 -c "ALTER DATABASE template1 REFRESH COLLATION VERSION;"
RHEL Netcat Issue

In systems which feature RHEL 8 or RHEL 9, you might find in journalctl’s log an error about a missing library for netcat:

May 02 09:20:02 demo.example.com systemd[1]: Started Session 3 of User zextras.
May 02 09:20:02 demo.example.com bash[3910]: netcat: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory
May 02 09:20:02 demo.example.com systemd[1]: Started Session 4 of User zextras.
May 02 09:20:02 demo.example.com bash[3912]: netcat: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory

The solution is to install the libbsd package:

# dnf install libbsd