• Info
  • Update form Open SuSE 15.5 to 15.6

A recipe to update grommunio from Open SuSE 15.5 to 15.6.

Open SuSE 15.6 is here and grommunio provides packages for Open SuSE 15.6, we may update the appliance.
Please note: If your system is still running on Open SuSE 15.4, use this document to upgrade to Open SuSE 15.5 first: https://community.grommunio.com/d/1086-update-form-open-suse-154-to-155

Note: With the script grommunio-update there is also a possibility to update to SuSE 15.6. However, no backup of the configuration is created and there is no possibility to compare the package before and after the update.
This recipe shows the manual update way which offers more possibilities and error checking.

Note: The update process takes approximately 30 minutes. If the update takes longer than an hour, you have very slow hardware. Probably this hardware is below the specifications for grommunio.

1. Preparing for the upgrade

  • Have your grommunio license details (username and password) ready, you may need them in step 10
  • Please note, this upgrade interrupts your mail system
  • If you have a virtualised environment, take a snapshot of the system
  • Connect to the grommunio server via SSH like Putty
  • For most commands you can copy and paste the commands to the grommunio server
  • If the server has an uptime of more than 30 days, it is recommended to reboot the server. Check the uptime with the uptime command and reboot with init 6 if necessary.
  • Stop and disable postfix to prevent mail loss
    systemctl --now disable postfix

2. Check that you have at least 5 GB of free space on the root volume

On the root / volume we need at least of 5 GB free space for the update, do not proceed if you not have less than 5 GB free on /. Run df -h to see the space statistics.

3. Create a tar backup of /etc for later comparison or restore

mkdir -p /root/WH/bck/
tar -cvzf /root/WH/bck/etc_$(date +%Y%m%d-%H%M%S).tgz /etc

4. Backup MariaDB

mysqldump --all-databases > /root/WH/bck/dump_grommunio_$(date +%Y%m%d-%H%M%S).sql

5. Install the latest updates

zypper ref && zypper up -y

Note: There are 2 possible problems at this point,

  1. the grommunio 15.5 repository is no longer available (tbd.), in this case just continue with the updgrade, at least the Open SuSE components will be updated and grommunio will be upgraded when upgrading to 15.6 in step 11.
  2. neither the grommunio 15.5 repository nor the Open SuSE 15.5 repository (tbd.) exists anymore, then continue with step 8. However, you need to make sure that both 15.6 repositories exist, because if the 15.6 repositories do not exist, an update will not be easy.

A full backup is recommended in both situations.

6. Check the MariaDB schema

gromox-dbop -U
The current schema is gx-131 (22. Nov. 2024)

Note: If the mariadb service does not start, I assume you have a very slow server like a NAS with 5400 rpm mechanical disks. Try upgrading the database manually with /usr/lib/mysql/mysql-systemd-helper upgrade and consider upgrading to a faster server.

7. Wait about 5 minutes to allow the schema upgrade for the domain and user databases to complete and the index to be rebuilt

Use top or htop to view activity on the databases.
Also use journalctl -f to see activities on this system. If you see messages like:
.... dbop_sqlite: upgrading /var/lib/gromox/user/x/y/exmdb/exchange.sqlite3 to schema EV-nn
Wait until all databases have been updated.
For the Community Edition and the Supported Edition, the current schema as of Nov. 2024 is EV-17.

8. Restart the server

init 6

9. Document the current state before the distribution update

rpm -qa | sort > /root/SLES_15.5.txt

10. Switch all repositories including other 3. party repositories like backup software from 15.5 to 15.6

sed -i 's/15.5/15.6/g' /etc/zypp/repos.d/*.repo
Check that all repositories have been updated with
cat /etc/zypp/repos.d/*.repo

As stated below, verify that /etc/zypp/repos.d/grommunio.repo is switched to 15.6!

Refresh repository list:
zypper refresh -f
Note that you may need your license details at this point. Check /etc/zypp/repos.d/grommunio.repo to see if username and password are in the file. The line in question looks like this:
baseurl=https://USERNAME:PASSWORD@download.grommunio.com/supported/openSUSE_Leap_15.6/?ssl_verify=no

The question from zypper about trust, should be answered as "a - trust always", if you are using a German OS, answer "i -immer vertrauen"

If you see errors about repo-sle-debug-update, disable the repository with:
zypper mr -d repo-sle-debug-update
and run refresh again:
zypper refresh -f

11. Distribution update to Open SuSE 15.6

zypper dup -y

If you see errors about obsolete openssl packages, allow zypper to remove these packages

12. Enable redis

Sometimes redis is not enabled after the upgrade
systemctl --now enable redis@grommunio.service

13. Restart MariaDB to force the DB upgrade

systemctl restart mariadb

Again: If the mariadb service does not start, I assume you have a very slow server like a NAS with 5400 rpm mechanical disks. Try upgrading the database manually with /usr/lib/mysql/mysql-systemd-helper upgrade and consider upgrading to a faster server.

14. Check that AppArmor is disabled, disable AppArmor if it is enabled

systemctl status apparmor --no-pager
If you see a message like Active: active (exited), stop, disable and mask AppArmor!
systemctl --now disable apparmor
systemctl mask apparmor

15. Re-enable timesync

The SuSE 15.6 upgrade removes timesyncd, so we need another NTP daemon. A good solution is chrony.
Check for an installed NTP daemon with rpm -qa | grep -e timesync -e ntp, if no NTP daemon is installed, install chrony:
zypper in chrony
systemctl unmask chronyd
systemctl --now enable chronyd

16. Reboot the server to activate the new modules and new kernel

init 6

17. Check for failed services

systemctl --failed
We should not see any failed services. If you have failed services, repair these errors and start all services.

Check again that AppArmor is disabled:
systemctl status apparmor --no-pager
If you see a message like Active: active (exited), disable as explained in step 15.

18. Document the upgrade

rpm -qa | sort > /root/SLES_15.6.txt

19. Compare old state with current state

vim -d /root/SLES_15.6.txt /root/SLES_15.5.txt
It is unlikely that you will find missing packages but if you do, reinstall them as follow
zypper in <MISSING-PACKAGE>
Ignore obsolete kernel and libfmt7-7* packages and old grup2 packages.

20. Find newer sample configuration files, these usually have the extension .rpmnew

find /* -iname '*.rpmnew'
Manually migrate the changes from the .rpmnew file into the original configuration file, this can be done with vim or diff. However, be careful not to overwrite or destroy the configuration of your system. Note: we made a backup of the configuration in the third step.
vim -d <FILE> <FILE>.rpmnew
or use diff
diff <FILE> <FILE>.rpmnew
and manually edit the configuration file to reflect the changes.
This requires some knowledge of the system, as overwriting the wrong variables may render your system unusable.
In /etc/postfix/master.cf, replace fifo with unix. The fifo transport is obsolete.

  • sed -i.bak 's/fifo/unix/g' /etc/postfix/master.cf

Do not touch this file: /etc/postfix/main.cf
It is also a good idea to migrate any new/updated comments from .rpmnew to the configuration file and remove any outdated comments.
After making the changes to the configuration files, delete the .rpmnew files, they are no longer needed.
Also restart the affected services or reboot the server again with init 6.

21. Find and delete outdated configuration files, these usually have the extension .rpmsave

find /* -iname '*.rpmsave'
Manually delete any obsolete configuration files, they are no longer needed.

22. Check at the logs for errors

journalctl -f and tail /var/log/nginx/*.log -f

23. Remove obsolete kernels

Check how many kernels are located in /boot?
ls -lar /boot
If you have more than two kernels, purge the obsolete kernels:
zypper purge-kernels
and install the purge-kernels service:
zypper in purge-kernels-service

24. Finalize the upgrade

run the grommunio update script to finalize the upgrade:
grommunio-update update

25. Test the system

Note that postfix is still disabled, so sending mails is not yet possible.
Fix any errors.

26. When everything works, enable and start postfix

systemctl --now enable postfix
and delete the snapshot

27. Now the system should be fully up and running again

Enjoy grommunio

Changes:

  • Simplified update process
  • Some commands combined into one line
  • (24.) Finalize the upgrade
  • See below how to install the "branding" module
  • MariaDB upgrade procedure
  • (23.) Purge-kernels-service

    WalterH
    Denke unter Punkt 17 fehlt ein "d" sollte systemctl restart chronyd anstelle systemctl restart chrony heißen

    lg
    Christian

      externa1 Thanks for the hint. I must have missed the last character, I have repaired it.

      For anyone like me fighting with mariadb segfaulting, if you use lz4, at least for me, I had to explicitly load the plugin with plugin-load-add=provider_lz4.so.

      This is not grommunio default! You should never change the grommunio settings. btw. changing the compression of the user database is useless, you may save some kB of storage - but makes more problems.

      Thank you for this great tutorial, just made my update.
      One thing perhaps, I had $releasever in my repo files instead of a hardcoded version on my home server.
      In order to be sure releasever gets the new version on zypper call, I would recommand to add --releasever=15.6 to the zypper calls, which would be ignored on hardcoded repo files, so it's a win-win.

      Also, perhaps one could check that easily forgotten services (I think grommunio-archive) is still working, eg:

      [ -d /etc/grommunio-archive ] && ss -laputen | grep $(grep archive /etc/postfix/transport | awk -F':' '{print $3}')

      Again, thank you, this really makes the upgrade a lesser buren.

      a month later

      Thank you for the tutorial, helps a lot, but one small issue

      the /etc/zypp/repos.d/grommunio.repo is not updated when running "sed -i 's/15.5/15.6/g' /etc/zypp/repos.d/*.repo".
      it still points to :
      [grommunio]
      enabled=1
      autorefresh=1
      baseurl=https://download.grommunio.com/community/openSUSE_Leap_15.5/?ssl_verify=no
      type=rpm-md

      after manually modifying it should look like:
      [grommunio]
      enabled=1
      autorefresh=1
      baseurl=https://download.grommunio.com/community/openSUSE_Leap_15.6/?ssl_verify=no
      type=rpm-md

      otherwise php-fpm brings the following error on the web:
      Not Found: PHP mapi extension not found
      If you have upgraded Gromox, please restart nginx/php-fpm
      grommunio Web can't start because of incompatible configuration.
      Please correct above errors, a good start is by checking your '/etc/php8/fpm/php.ini' file.
      You can disable this configuration check by editing the file '/usr/share/grommunio-web/config.php', but this is not recommended.

      and via journalctl -f ph-fmp
      Dec 23 10:13:44 mailhost systemd[1]: Starting The PHP FastCGI Process Manager...
      Dec 23 10:13:45 mailhost php-fpm[1659]: [23-Dec-2024 10:13:45] NOTICE: PHP message: PHP Warning: PHP Startup: mapi: Unable to initialize module
      Dec 23 10:13:45 mailhost php-fpm[1659]: Module compiled with module API=20200930
      Dec 23 10:13:45 mailhost php-fpm[1659]: PHP compiled with module API=20220829
      Dec 23 10:13:45 mailhost php-fpm[1659]: These options need to match
      Dec 23 10:13:45 mailhost php-fpm[1659]: in Unknown on line 0

        WomIT_KHE

        Already opened a ticket for that with the following content... (the text on top is not worth translating 😛)

        fyi...  - ich sehe gerade bei dem opensuse*|sles) wirds wohl probleme geben mit SuSE-Ent... aber hab ich nicht zum testen und jetzt auch keine lust.
        
        gromi:~ # diff -u /usr/sbin/grommunio-repo* ; diff -u /usr/share/grommunio-setup/common/helpers* ; diff -u /usr/share/grommunio-setup/common/repo*
        --- /usr/sbin/grommunio-repo    2024-05-31 15:24:55.000000000 +0200
        +++ /usr/sbin/grommunio-repo.fixed      2024-12-17 19:14:45.640128485 +0100
        @@ -65,7 +65,7 @@
                               # create repo file directly
                               #zypper ar -f -k "${REPO_URL}" grommunio > /dev/null 2>&1
                               echo -e "[grommunio]\nenabled=1\nautorefresh=1\nbaseurl=${REPO_URL}\ntype=rpm-md\n" > /etc/zypp/repos.d/grommunio.repo
        -                       sed -i 's#15.[34]#15.5#g' /etc/zypp/repos.d/*.repo > /dev/null 2>&1
        +                       sed -i 's#15.[345]#15.6#g' /etc/zypp/repos.d/*.repo > /dev/null 2>&1
                               rpm --import https://download.grommunio.com/RPM-GPG-KEY-grommunio > /dev/null 2>&1
                               ;;
                       yum)
        @@ -120,11 +120,11 @@
                       ;;
               opensuse*|sles)
                       PKG_MANAGER="zypper"
        -               REPO_URL="${REPO_PREFIX}/${VALID_REPO_TYPE}/openSUSE_Leap_15.5/?ssl_verify=no"
        +               REPO_URL="${REPO_PREFIX}/${VALID_REPO_TYPE}/${NAME/ /_}_${VERSION_ID}"
                       ;;
               grommunio*)
                       PKG_MANAGER="zypper"
        -               REPO_URL="${REPO_PREFIX}/${VALID_REPO_TYPE}/openSUSE_Leap_15.5/?ssl_verify=no"
        +               REPO_URL="${REPO_PREFIX}/${VALID_REPO_TYPE}/openSUSE_Leap_15.6"
                       ;;
               *)
                       echo "Distribution '${ID}' is not supported. Please check available distributions at https://download.grommunio.com"
        --- /usr/share/grommunio-setup/common/helpers   2024-06-04 15:48:45.000000000 +0200
        +++ /usr/share/grommunio-setup/common/helpers.fixed     2024-12-17 19:12:50.864132515 +0100
        @@ -120,5 +120,20 @@
        
        distlevel()
        {
        -       echo "15.5"
        +       (
        +       if [ -f /etc/os-release ]; then
        +               . /etc/os-release
        +       else
        +               echo "The file /etc/os-release was not found. The distribution cannot be identified."
        +               exit 1
        +       fi
        +       case $ID in
        +               opensuse*|sles)
        +                       echo "$VERSION_ID"
        +                       ;;
        +               *)
        +                       echo "15.6"
        +                       ;;
        +       esac
        +)
        }
        --- /usr/share/grommunio-setup/common/repo      2024-06-04 15:48:45.000000000 +0200
        +++ /usr/share/grommunio-setup/common/repo.fixed        2024-12-17 19:15:54.144126079 +0100
        @@ -25,7 +25,7 @@
        [grommunio]
        enabled=1
        autorefresh=1
        -baseurl=https://${REPO_USER}:${REPO_PASS}@download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)/?ssl_verify=no
        +baseurl=https://${REPO_USER}:${REPO_PASS}@download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)
        type=rpm-md
        EOF
               else
        @@ -35,7 +35,7 @@
        [grommunio]
        enabled=1
        autorefresh=1
        -baseurl=https://download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)/?ssl_verify=no
        +baseurl=https://download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)
        type=rpm-md
        EOF
               fi

          crpb kein problem .. ich verstehe 😃
          aber vi, diff sind ja unsere Freunde

          WomIT_KHE s not updated when running "sed -i 's/15.5/15.6/g' /etc/zypp/repos.d/*.repo"

          For me, these command worked on about 12 updates without any issues.

          • crpb replied to this.

            WalterH

            Try a fresh iso/ova install, upgrade to 15.6, run grommunio-setup, look at grep -r 15.5 /etc/zypp/

            Indeed. As soon as you check for updates using the admin web UI, it reverts the chnages and swithes back to 15.6 repositories...

              KnoJoh Indeed. As soon as you check for updates using the admin web UI, it reverts the chnages and swithes back to 15.6 repositories...

              Surely you should already be on the 15.6 repositories?

              Hi
              at step 11 i get this error

              `mail01:~ # zypper dup -y
              Repository-Daten werden geladen...
              Installierte Pakete werden gelesen...
              Warnung: Sie sind im Begriff, eine Distributionsaktualisierung mit allen aktivierten Repositorys durchzuführen. Vergewissern Sie sich, dass diese Repositorys kompatibel sind, bevor Sie fortfahren. Weitere Informationen zu diesem Kommando finden Sie unter 'man zypper'.
              Distributions-Aktualisierungen werden verarbeitet...
              
              Problem: 1: Problem mit dem installierten php8-gnupg-1.5.1-lp155.2.4.x86_64
               Lösung 1: Folgende Aktionen werden ausgeführt:
                veraltetes php8-gnupg-1.5.1-lp155.2.4.x86_64 beibehalten
                veraltetes php8-8.0.30-150400.4.49.1.x86_64 beibehalten
               Lösung 2: php8-gnupg-1.5.1-150600.13.3.2.x86_64 von Hersteller SUSE LLC <https://www.suse.com/> installieren
              und php8-gnupg-1.5.1-lp155.2.4.x86_64 von Hersteller obs://build.opensuse.org/server:php:extensions ersetzen
              
              Wählen Sie aus den obigen Lösungen mittels Nummer oder brechen Sie (a)b [1/2/a/d/?] (a): a
              mail01:~ #`

                Hi,
                with option 2 it works.

                But is this normal

                ▶ Starting Check (zypper ref && zypper lu).
                ▶ on repository community.
                Credentials = :.
                Repository URL = https://download.grommunio.com/community/openSUSE_Leap_15.5/?ssl_verify=no
                grep: /etc/yum.repos.d/: No such file or directory
                \x1b[31mNo correct package manager found.\x1b[0m │
                Repository 'base' ist aktuell.

                That the Repro is 15.5 in this info

                • crpb replied to this.

                  MichaelH php8-gnupg

                  Die Frage ist, wieso ist das php8-gnupg auf diesem Server vorhanden? Der grommunio Kern benötigt das nicht.

                  @WalterH Das kann ich so direkt nicht beantworten. Auf dem Server ist nichts anderes installiert.

                  Werde mal gucken ob ich dazu noch was finde.

                  © 2020-2024 grommunio GmbH. All rights reserved. | https://grommunio.com | Data Protection | Legal notice