Hi Team,
I've found the problems (for my installation) and the solutions (perhaps to be improved).
Problems:
- centreon bookworm packages are not considered as an update but as a downgrade when debian version change
- the perl update doesn't work correctly between debian 11 and debian 12 (@inc is not correct), which creates dependency problems, modules not found, etc.
Solutions:
- force installation of centreon Bookworm packages
- reinstall perl from scratch
@Laurent , can you tell me if it looks good ? if it's good, I think it might be interesting to link or modify this how-to
@TA-FFM & @Jonathan Rio, you can test it if you like...
Good reading
So here's my solution to update Debian 11 / Centreon 24.04.6 logged in as root but if it doesn't work, I have steps to debug :
Step 1 : Update the current installation
apt update
apt upgrade
apt dist-upgrade
Apply the update via the web interface
# To clean up and make sure the update has been applied correctly
apt autoremove
apt autoclean
reboot
At this stage, make sure there are no more updates available and you have a working centreon.
Step 2 : Start update to Bookworm
# Change the repo
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/centreon*
# Passage of the first update phase
apt clean
apt update
apt upgrade --without-new-pkgs
Now we force the installation of Bookworm packages for centreon.
Create file /etc/apt/preferences.d/centreon.pref and add
Package: centreon*
Pin: release n=bookworm
Pin-Priority: 1001
And update centreon packages and others
apt upgrade
# Then, we can delete the pref file
rm -f /etc/apt/preferences.d/centreon.pref
Step 3 : Reinstall Perl and its dependencies
# Uninstall all Perl packages and lib and purge conf
for package in $(dpkg-query -l | grep perl | grep -v centreon | awk -F " " '{print $2}')
do
dpkg -r --force-depends $package
dpkg --purge --force-depends $package
done
Now we can reinstall the necessary
apt --fix-broken install
Step 4 : Finalize Bookworm installation
# Now, the full-upgrade doesn't uninstall centreon packages
apt full-upgrade
apt autoremove
reboot
And apply the update via the web interface
Now we're running Debian 12 / Centreon 24.04.7
Step 5 : Update to Centreon 24.10
# Change centreon repo
echo "deb https://packages.centreon.com/apt-standard-24.10-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
# Perform update
apt update
apt full-upgrade
# Clean the install
apt autoremove
# Restart to finalize
reboot
And apply the update via the web interface
Sorry @Bastien , had other Tasks to run first.
I tried your way and yes, it works flawlessly. Thank you for your effort.
Regards
Timo
Hello,
@Bastien I tested on my central lab server, your procedure works correctly. Congrats !
@Laurent What is your opinion ?
Regards.
Jonathan.
Hello,
@Bastien thanks for your procedure, it works correctly
Can you check your zmq packages version?
apt list --installed | grep -i zmq
On my side, the packages libzmq3-dev and libzmq5 are still related to bullseye:
# apt list --installed | grep -i zmq
libzmq-constants-perl/bookworm,now 1.04-bookworm-1 all -installed,automatic]
libzmq-ffi-perl/stable,now 1.18-2 all -installed,automatic]
libzmq-libzmq4-perl/bookworm,now 0.01-deb12u1 amd64 installed,automatic]
libzmq3-dev/now 4.3.5-0.1~bullseye amd64 installed,local]
libzmq5/now 4.3.5-0.1~bullseye amd64 installed,local]
I used this command to force the update:
apt install libzmq3-dev=4.3.5-0.1~bookworm libzmq5=4.3.5-0.1~bookworm
Hi,
@TA-FFM & @Jonathan Rio , Great, thanks for your feedback, I’m glad it worked for you too, I spent some time there, it's cool that it works for others
@sduret, thanks for feedback an no, I have the right packages installed during the upgrade, but I have fewer than you.
There may also have been a dependency problem here for you.
#apt list --installed | grep -i zmq
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libzmq-ffi-perl/stable,now 1.18-2 all 1installé, automatique]
libzmq3-dev/bookworm,now 4.3.5-0.1+deb12u1 amd64 binstallé, automatique]
libzmq5/bookworm,now 4.3.5-0.1+deb12u1 amd64 einstallé, automatique]
The only traces of Bullseye I've found are configuration files for 4 packages.
#dpkg-query -l | grep bullseye
rc centreon-database 22.10.23-bullseye
rc centreon-poller-centreon-engine 22.10.23-bullseye
rc centreon-web-apache 22.10.23-bullseye
rc php8.1-sourceguardian-loader 8.1-1-bullseye
I confess I didn't really look into what they were or whether I could delete them.
If anyone has any ideas....
@Bastien The following centreon packages don’t exist on recent repositories version (24.04 and 24.10):
- centreon-database
- centreon-poller-centreon-engine
- centreon-web-apache
About php sourceguardian, it seems it’s only since the 24.10 release.
@sduret Ok, thank’s
I'll wait for the next update just in case and I'll delete the conf then.