Migrate icinga Centos 7 to AlmaLinux8

We are currently using the icinga2 director, on centos 7, we want to migrate to almalinux8. It’s possible?
What is the best way at home if possible.

Regards, and thank you very much

I did it but it’s a pain and I wish I had used Debian :wink:
The lfops Ansible roles helped in getting the Icinga stuff back up and running again.

Can you tell us how you did it?

If you can wait till Wednesday, I need to do the last one and can provide a write up here.

1 Like

Yes of course, it would be a great help.

Thank you so much. I wait until Wednesday

First Phase

  1. create a Snapshot of your server
  2. disable notifications
sudo icinga2 feature disable notification
sudo systemctl restart icinga2
    • Fully updated system is required to accomplish the upgrade. So, install the latest CentOS updates first, and reboot.
sudo yum update -y
sudo reboot
  1. Install elevate-release package with the project repo and GPG key.
sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm

  1. Install leapp packages and migration data for the OS you want to upgrade
sudo yum install -y leapp-upgrade leapp-data-almalinux
  1. Start a preupgrade check. In the meanwhile, the Leapp utility creates a special /var/log/leapp/leapp-report.txt file that contains possible problems and recommended solutions. No rpm packages will be installed at this phase.
sudo leapp preupgrade
  1. The following fixes from the /var/log/leapp/leapp-report.txt file are mandatory, but you can also review the rest of them if needed.
sudo rmmod pata_acpi
echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config
sudo passwd # set root pw if not already done in case domain user stops working
sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True

I also had to:

sudo leapp answer --section authselect_check.confirm=True
dnf remove python3-urllib3 python3-chardet python3-six MariaDB-common

Check the ELevate Frequent Issues page for known and frequent issues and guidance steps to solve them.
8. Start an upgrade. You’ll be offered to reboot the system after this process is completed.

sudo leapp upgrade
sudo reboot

References: About ELevate project | AlmaLinux Wiki & follow ELevate Quickstart Guide | AlmaLinux Wiki

1 Like

Don’t forget, centos7 is still supported by icinga, centos8 is not.
so centos8 packages are not uptodate anymore.

That means that you can’t get current icinga packages for centos8/alma8/rocky8/rhel8 without an additional icinga subscription.

@rivad If you want to add/rewrite the subscription part to your post, I will delete mine in order to have everything in one post for future reference

We have a subscription and now there is also the free dev subscription and a third party rpm repository Yum repository and RPM packages for CentOS Stream 9 / AlmaLinux 9 / Rocky Linux 9? · Issue #9390 · Icinga/icinga2 · GitHub

@moreamazingnick it’s ok, I like the conversational style and having the thread as reverence.

1 Like

Second Phase

have a look at what it’s doing in the initrd and reboot when finished

Third Phase

  1. login and become root or login as root if you’re domain login is broken
sudo rm /var/lib/sss/db/cache_*.ldb
sudo systemctl restart sssd
  1. test domain login - took a long time but worked :smiley:
  2. After reboot, login to the system and check how the migration went. Verify that the current OS is the one you need.
cat /etc/redhat-release
cat /etc/os-release
rpm -qa | grep centos
rpm -qa | grep el7

Now up to fixing the Icinga and Grafana…


wow this is a problem



Thank you very much for your help.
Are there more phases?

thank you very much

yes I will go on to fix it but I have the help of the GitHub - Linuxfabrik/lfops: LFOps is an Ansible Collection of generic Roles, Playbooks and Plugins for managing Linux-based Cloud Infrastructures. roles as the server was set up that way and I just need to back port any local changes to the inventory (api-users and such) and reapply the roles.

We also needed to update a lot of variables in the Ansible inventory as we used a older version of lfops while setting up the server and haven’t updated the inventory when we pulled in the newer version.

So plan for 2 work days of downtime and rebuilding or just setup a new one and switch over when finished :wink: