Table of Contents
Esia upgrade - Debian 11 to Debian 12
Introduction
The upgrade process depends very much on the customisation that has been done on your Esia in terms of plugins.
The more plugins you have added, the greater the risk that these plugins will go into error after the update. It is therefore all the more important to respect the backup process in addition to the snapshot in order to avoid having to perform a rollback.
The rest of the tutorial covers :
- 2. Prerequisites Necessary to start the update.
- 3. Updating process Steps required to complete the update.
- 4. Troubleshooting Troubleshooting: Refer to this chapter only if you encounter a problem in point 3.
- 5. Cleaning To recover disk space after the update.
We strongly recommend that you have read this tutorial in its entirety at least once before starting the production update.
Prerequisites
Before starting the update, all of the following points must be met:
- Have an internet connection to download the update packages.
- Make a snapshot of the VM beforehand in order to quickly return to the previous state in the event of MAJOR problems.
- Make a backup of certain Esia files. To avoid having to rollback the snapshot in the event of a SMALL problem. This step is NECESSARY in the event of a support call. See point 3.1.1 « Faire un backup de votre Esia »
Update steps
Pre-update preparation
The following 3 steps must be carried out in the desired order.
Check available space
Before you start, check that you have enough space for the backup or linux images (partition: /boot).
- copy
df -h /
If you don't have enough space, you'll need to do some clean-up (log files, old linux images, etc).
root@debian-bullseye:~# df -h Filesystem Size Used Avail Use% Mounted on udev 982M 0 982M 0% /dev tmpfs 200M 21M 180M 11% /run /dev/mapper/main--vg-root 8.9G 1.7G 6.7G 21% / tmpfs 998M 28K 998M 1% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 998M 0 998M 0% /sys/fs/cgroup /dev/sda1 472M 49M 399M 11% /boot tmpfs 200M 0 200M 0% /run/user/1000 root@debian-bullseye:/#
Make a backup of your Esia
This will avoid having to return to the snapshot in the event of a simple plugin error or similar. Plugin errors are sometimes unavoidable and make this task necessary.
The steps are as follows:
Check that you have enough disk space for the backup using the command :
- copy
df -h /
The disk space required for the backup depends on your Esia. But if you use less than 50% of your disk space. You are sure to have enough.
- backup.sh
#!/bin/bash cd / mkdir -p /root/BACKUP_ESIA su postgres -c pg_dumpall > /root/BACKUP_ESIA/pg_database.sql cp -r /usr/local/esia/plugins /root/BACKUP_ESIA/plugins cp -r /usr/local/esia/public_html /root/BACKUP_ESIA/public_html cp -r /etc/apache2 /root/BACKUP_ESIA/apache2 cp -r /etc/esia /root/BACKUP_ESIA/esia_conf iptables-save > /root/BACKUP_ESIA/iptables.txt dpkg -l > /root/BACKUP_ESIA/version.txt
You can check whether the backup was successful by entering the following command:
- copy
du -sh /root/BACKUP_ESIA/*
Examples:
On a small esia
root@debian-bullseye:~# cd / root@debian-bullseye:/# mkdir -p /root/BACKUP_ESIA root@debian-bullseye:/# su postgres -c pg_dumpall > /root/BACKUP_ESIA/pg_database.sql root@debian-bullseye:/# cp -r /usr/local/esia/plugins /root/BACKUP_ESIA/plugins root@debian-bullseye:/# cp -r /usr/local/esia/public_html /root/BACKUP_ESIA/public_html root@debian-bullseye:/# cp -r /etc/apache2 /root/BACKUP_ESIA/apache2 root@debian-bullseye:/# cp -r /etc/esia /root/BACKUP_ESIA/esia_conf root@debian-bullseye:/# iptables-save > /root/BACKUP_ESIA/iptables.txt root@debian-bullseye:/# dpkg -l > /root/BACKUP_ESIA/version.txt root@debian-bullseye:/# du -sh /root/BACKUP_ESIA/* 652K /root/BACKUP_ESIA/apache2 32K /root/BACKUP_ESIA/esia_conf 4,0K /root/BACKUP_ESIA/iptables.txt 660K /root/BACKUP_ESIA/pg_database.sql 7.9M /root/BACKUP_ESIA/plugins 23M /root/BACKUP_ESIA/public_html 96K /root/BACKUP_ESIA/version.txt root@debian-bullseye:/#
On an Esia with 150 nodes/1800 services
root@enterprise-v3:~# cd / root@enterprise-v3:/# mkdir -p /root/BACKUP_ESIA root@enterprise-v3:/# su postgres -c pg_dumpall > /root/BACKUP_ESIA/pg_database.sql root@enterprise-v3:/# cp -r /usr/local/esia/plugins /root/BACKUP_ESIA/plugins root@enterprise-v3:/# cp -r /usr/local/esia/public_html /root/BACKUP_ESIA/public_html root@enterprise-v3:/# cp -r /etc/apache2 /root/BACKUP_ESIA/apache2 root@enterprise-v3:/# cp -r /etc/esia /root/BACKUP_ESIA/esia_conf root@enterprise-v3:/# iptables-save > /root/BACKUP_ESIA/iptables.txt root@enterprise-v3:/# dpkg -l > /root/BACKUP_ESIA/version.txt root@enterprise-v3:/# du -sh /root/BACKUP_ESIA/* 692K /root/BACKUP_ESIA/apache2 32K /root/BACKUP_ESIA/esia_conf 4,0K /root/BACKUP_ESIA/iptables.txt 22M /root/BACKUP_ESIA/pg_database.sql 9,1M /root/BACKUP_ESIA/plugins 604M /root/BACKUP_ESIA/public_html 116K /root/BACKUP_ESIA/version.txt root@enterprise-v3:/#
In the event of an error, files/directories are missing or empty
root@debian-bullseye:/# cd / root@debian-bullseye:/# mkdir -p /root/BACKUP_ESIA root@debian-bullseye:/# su postgres -c pg_dumpall > /root/BACKUP_ESIA/pg_database.sql pg_dumpall: could not connect to database "template1": could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? root@debian-bullseye:/# cp -r /usr/local/esia/plugins /root/BACKUP_ESIA/plugins root@debian-bullseye:/# cp -r /usr/local/esia/public_html /root/BACKUP_ESIA/public_html root@debian-bullseye:/# cp -r /etc/apache2 /root/BACKUP_ESIA/apache2 root@debian-bullseye:/# cp -r /etc/esia /root/BACKUP_ESIA/esia_conf root@debian-bullseye:/# iptables-save > /root/BACKUP_ESIA/iptables.txt root@debian-bullseye:/# dpkg -l > /root/BACKUP_ESIA/version.txt root@debian-bullseye:/# du -sh /root/BACKUP_ESIA/* 652K /root/BACKUP_ESIA/apache2 32K /root/BACKUP_ESIA/esia_conf 4,0K /root/BACKUP_ESIA/iptables.txt 0 /root/BACKUP_ESIA/pg_database.sql 7.9M /root/BACKUP_ESIA/plugins 23M /root/BACKUP_ESIA/public_html 96K /root/BACKUP_ESIA/version.txt root@debian-bullseye:/#
Make a snapshot of the VM
In order to come back quickly in case of a complete crash.
Disable the alerting system
To avoid receiving false positives during the update.
- copy
chmod -x /usr/local/esia/plugins/alerting/*
Updating
Updating works like this:
- Modify the package source file to indicate that you are switching to bookworm (command sed)
- Update the system database containing the list of packages (command apt update)
- Update the system ( apt full-upgrade). Before executing this command, we strongly recommend that you note the time and check the current status of your alerts. This will help you later to check that Esia plugins are working correctly after the update.
Prepare the update :
Check the source apt file, using the following command:
- copy
cat /etc/apt/sources.list
You should get the following lines:
deb http://deb.debian.org/debian bullseye main contrib non-free deb-src http://deb.debian.org/debian bullseye main contrib non-free deb http://stable.repository.esia-sa.com/esia bullseye contrib non-free
If necessary, edit the file with the nano command (ctrl + o to save and ctrl +x to exit).
- copy
nano /etc/apt/sources.list
We are now going to replace all bullseye with bookworm and update the list of packages.
- copy
sed -i s/bullseye/bookworm/g /etc/apt/sources.list apt update
Example
root@debian-bullseye:/# sed -i s/bullseye/bookworm/g /etc/apt/sources.list root@debian-bullseye:/# apt update Get:1 http://10.8.0.9 bullseye InRelease [2,271 B] Get:2 http://10.8.0.9 bullseye/contrib amd64 Packages [7,200 B] Get:3 http://10.8.0.9 bullseye/non-free amd64 Packages [1,963 B] Ign http://10.8.0.9 bullseye/contrib Translation-en_US Ign http://10.8.0.9 bullseye/contrib Translation-en Ign http://10.8.0.9 bullseye/non-free Translation-en_US Ign http://10.8.0.9 bullseye/non-free Translation-en Ign http://ftp.be.debian.org bullseye InRelease Get:4 http://ftp.be.debian.org bullseye Release.gpg [2,410 B] Get:5 http://ftp.be.debian.org bullseye Release [118 kB] Get:6 http://ftp.be.debian.org bullseye/main amd64 Packages [7,080 kB] Get:7 http://ftp.be.debian.org bullseye/main Translation-en [5,377 kB] Fetched 12.6 MB in 2s (4,354 kB/s) Reading package lists... Done root@debian-bullseye:/#
Check the current state of your system:
Note what time it is.
Check system disk space using the command below:
- copy
df -h |grep -v tmpfs|grep -v udev|grep -v /boot
Example:
root@enterprise-v3:/# df -h |grep -v tmpfs|grep -v udev|grep -v /boot File system Size Used Available Uti% Mounted on /dev/mapper/bullseye--students--vg-root 19G 7,7G 9,9G 44% / root@enterprise-v3:/#
Running the update :
To download the ESIA + OS update
- copy
apt -d full-upgrade
Before confirming, check that you have enough disk space:
Then run the following command to apply and configure the packages:
- copy
apt full-upgrade
In the example below, 475 MB + 1,195 MB will be required during installation.
The following NEW packages will be installed: cpp-12 cron-daemon-common dbus-bin dbus-daemon dbus-session-bus-common dbus-system-bus-common dbus-user-session esia-pypsrp g++-12 gcc-11-base gcc-12 gcc-12-base guile-3.0-libs libabsl20220623 libaom3 libapache2-mod-php8.2 libasan8 libavif15 libboost-filesystem1.81.0 libboost-program-options1.81.0 libbpf1 libcbor0.8 libdav1d6 libde265-0 libencode-perl libffi8 libfile-find-rule-perl libgav1-1 libgcc-12-dev libgprofng0 libgsasl18 libgssglue1 libheif1 libicu72 libidn12 libjemalloc2 libjsoncpp25 libldap-2.5-0 liblerc4 libllvm14 libllvm15 libmailutils9 libnuma1 libnumber-compare-perl libperl5.36 libproc2-0 libpython3.11 libpython3.11-dev libpython3.11-minimal libpython3.11-stdlib librav1e0 libregexp-ipv6-perl libsemanage2 libsepol2 libssl3 libstdc++-12-dev libstring-crc32-perl libsvtav1enc1 libsystemd-shared libtext-glob-perl libtiff6 libtsan2 liburing2 libwebp7 libx265-199 libxrandr2 libyuv0 linux-image-6.1.0-29-amd64 ntpsec ntpsec-ntpdig perl-modules-5.36 php8.2-cli php8.2-common php8.2-curl php8.2-opcache php8.2-pgsql php8.2-readline php8.2-rrd php8.2-ssh2 php8.2-sybase postgresql-15 postgresql-client-15 python3-cffi python3-cffi-backend python3-cryptography python3-ntp python3-ply python3-pycparser python3.11 python3.11-dev python3.11-minimal rpcsvc-proto usrmerge util-linux-extra zstd The following packages will be upgraded: adduser apache2 apache2-bin apache2-data apache2-utils apparmor apt apt-utils base-files base-passwd bash bind9-dnsutils bind9-host bind9-libs binutils binutils-common binutils-x86-64-linux-gnu bsdextrautils bsdutils busybox bzip2 ca-certificates console-setup console-setup-linux coreutils cpio cpp cron dash dbus debconf debconf-i18n debian-archive-keyring debianutils dictionaries-common diffutils dirmngr discover discover-data dmeventd dmidecode dmsetup dnsutils dpkg dpkg-dev e2fsprogs e2fsprogs-l10n eject emacsen-common esia-config esia-cron esia-daemon esia-database esia-importation-common esia-keystore esia-plugins-open esia-poller esia-rcm esia-watchdog exim4-base exim4-config exim4-daemon-light fakeroot file findutils fontconfig fontconfig-config fonts-dejavu-core freeipmi-common freeipmi-tools freetds-common g++ gawk gcc gettext-base gnupg gnupg-agent gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep groff-base grub-common grub-pc grub-pc-bin grub2-common gsasl-common guile-2.2-libs gzip hostname htop iamerican ibritish ienglish-common ifupdown init init-system-helpers initramfs-tools initramfs-tools-core installation-report iproute2 iptables iputils-ping isc-dhcp-client isc-dhcp-common ispell kbd keyboard-configuration klibc-utils kmod krb5-locales less libacl1 libaio1 libalgorithm-c3-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapt-pkg6.0 libargon2-1 libasan6 libassuan0 libatomic1 libattr1 libaudit-common libaudit1 libauthen-pam-perl libauthen-sasl-perl libauthen-simple-net-perl libauthen-simple-pam-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libbinutils libblas3 libblkid1 libboost-chrono1.74.0 libboost-filesystem1.74.0 libboost-program-options1.74.0 libboost-random1.74.0 libboost-regex1.74.0 libboost-system1.74.0 libboost-timer1.74.0 libbrotli1 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc-devtools libc-l10n libc6 libc6-dev libcairo2 libcap-ng0 libcap2 libcap2-bin libcapture-tiny-perl libcc1-0 libcgi-pm-perl libclass-accessor-perl libclass-c3-perl libclass-c3-xs-perl libclass-dbi-perl libclass-dbi-pg-perl libclass-inspector-perl libclass-load-perl libclass-load-xs-perl libclass-method-modifiers-perl libclass-singleton-perl libclass-tiny-perl libclass-trigger-perl libclass-xsaccessor-perl libclone-choose-perl libclone-perl libcom-err2 libcommon-sense-perl libconfig-inifiles-perl libconvert-binhex-perl libcrypt-dev libcrypt-passwdmd5-perl libcrypt1 libcrypto++8 libcryptsetup12 libctf-nobfd0 libctf0 libcurl4 libdata-dump-perl libdata-optlist-perl libdatetime-format-mail-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdatrie1 libdb5.3 libdbd-pg-perl libdbd-pgsql libdbi-perl libdbix-contextualfetch-perl libdbus-1-3 libdebconfclient0 libdeflate0 libdevel-callchecker-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdevel-overloadinfo-perl libdevel-partialdump-perl libdevel-stacktrace-perl libdevmapper-event1.02.1 libdevmapper1.02.1 libdigest-hmac-perl libdiscover2 libdist-checkconflicts-perl libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-new2 libdrm-radeon1 libdrm2 libdynaloader-functions-perl libedit2 libelf1 libemail-abstract-perl libemail-address-xs-perl libemail-date-format-perl libemail-messageid-perl libemail-mime-contenttype-perl libemail-mime-encodings-perl libemail-mime-perl libemail-sender-perl libemail-simple-perl libencode-locale-perl libestr0 libeval-closure-perl libevent-2.1-7 libevent-core-2.1-7 libevent-pthreads-2.1-7 libexception-class-perl libexpat1 libexpat1-dev libexporter-tiny-perl libext2fs2 libfakeroot libfastjson4 libfcgi-perl libfdisk1 libfido2-1 libfile-fcntllock-perl libfile-listing-perl libfile-sharedir-perl libfont-afm-perl libfontconfig1 libfreeipmi17 libfreetype6 libfribidi0 libfstrm0 libfuse2 libgc1 libgcc-s1 libgcrypt20 libgd3 libgdbm-compat4 libgdbm6 libgl1 libgl1-mesa-dri libglapi-mesa libglib2.0-0 libglib2.0-data libglvnd0 libglx-mesa0 libglx0 libgmp10 libgnutls-dane0 libgnutls30 libgomp1 libgpg-error-l10n libgpg-error0 libgpm2 libgssapi-krb5-2 libharfbuzz0b libhogweed6 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhttp-server-simple-perl libidn2-0 libima-dbi-perl libimport-into-perl libio-html-perl libio-pty-perl libio-socket-ssl-perl libip4tc2 libip6tc2 libipc-run-perl libipc-shareable-perl libipmiconsole2 libipmidetect0 libiptc0 libisl23 libitm1 libjansson4 libjbig0 libjpeg62-turbo libjs-jquery libjs-jquery-metadata libjs-jquery-tablesorter libjs-jquery-ui libjs-sphinxdoc libjs-underscore libjson-c5 libjson-perl libjson-xs-perl libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 libksba8 libldap-common liblingua-en-inflect-perl liblist-moreutils-xs-perl liblocale-gettext-perl liblog-log4perl-perl liblognorm5 liblsan0 libltdl7 liblua5.3-0 liblvm2cmd2.03 liblwp-mediatypes-perl liblz4-1 liblzma5 libmagic-mgc libmagic1 libmail-imapclient-perl libmail-pop3client-perl libmail-sendmail-perl libmailtools-perl libmariadb3 libmath-round-perl libmaxminddb0 libmd0 libmime-lite-perl libmime-tools-perl libmime-types-perl libmodule-implementation-perl libmodule-pluggable-perl libmodule-runtime-conflicts-perl libmodule-runtime-perl libmoose-perl libmoox-types-mooselike-perl libmount1 libmpc3 libmpfr6 libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libncurses5 libncurses6 libncursesw5 libncursesw6 libnet-http-perl libnet-ip-perl libnet-libidn-perl libnet-openssh-perl libnet-smtp-ssl-perl libnet-smtp-tls-perl libnet-smtps-perl libnet-snmp-perl libnet-ssleay-perl libnetfilter-conntrack3 libnettle8 libnewt0.52 libnfnetlink0 libnftables1 libnftnl11 libnghttp2-14 libnl-3-200 libnl-genl-3-200 libnss-systemd libntlm0 libnumber-format-perl libonig5 libopts25 libp11-kit0 libpackage-deprecationmanager-perl libpackage-stash-perl libpackage-stash-xs-perl libpadwalker-perl libpam-cap libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libparams-classify-perl libparams-util-perl libparams-validate-perl libparams-validationcompiler-perl libparse-recdescent-perl libpcap0.8 libpci3 libpciaccess0 libpcre2-8-0 libpcre3 libpipeline1 libpixman-1-0 libpng16-16 libpopt0 libpq5 libprotobuf-c1 libpsl5 libpython3-dev libpython3-stdlib libquadmath0 libreadline8 libref-util-perl libref-util-xs-perl librrd8 librrds-perl librrdtool-oo-perl libsasl2-2 libsasl2-modules libsasl2-modules-db libscalar-list-utils-perl libseccomp2 libselinux1 libsemanage-common libsensors-config libsensors5 libsigsegv2 libslang2 libsmartcols1 libsnmp-base libsnmp40 libsocket6-perl libspecio-perl libsql-abstract-limit-perl libsql-abstract-perl libsqlite3-0 libss2 libssh2-1 libstdc++6 libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl libswitch-perl libsybdb5 libsys-hostname-long-perl libsystemd0 libtasn1-6 libtest-deep-perl libtest-fatal-perl libtext-charwidth-perl libtext-csv-perl libtext-csv-xs-perl libtext-iconv-perl libtext-trim-perl libtext-unidecode-perl libtext-wrapi18n-perl libthai-data libthai0 libthrowable-perl libtime-duration-perl libtinfo5 libtinfo6 libtirpc-common libtirpc-dev libtirpc3 libtry-tiny-perl libtsan0 libubsan1 libudev1 libunbound8 libunistring2 libuniversal-moniker-perl libunwind8 liburi-perl libusb-1.0-0 libustr-1.0-1 libuuid1 libuv1 libvariable-magic-perl libvulkan1 libwayland-client0 libwrap0 libwww-mechanize-perl libwww-perl libx11-6 libx11-data libx11-xcb1 libxapian30 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1 libxdamage1 libxext6 libxfixes3 libxfont2 libxml-dom-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxml-simple-perl libxml2 libxmlrpc-epi0 libxmu6 libxmuu1 libxpm4 libxrender1 libxslt1.1 libxstring-perl libxt6 libxtables12 libxxhash0 libz3-4 libzstd1 linux-base linux-image-amd64 linux-libc-dev locales login logrotate logsave lsb-base lua-lpeg lvm2 mailcap mailutils mailutils-common man-db manpages manpages-dev mariadb-common mawk media-types mesa-vulkan-drivers mount mysql-common nano ncal ncurses-base ncurses-bin ncurses-term ndiff net-tools netbase nftables nmap nmap-common ntp openssh-client openssh-server openssh-sftp-server openssl os-prober passwd pci.ids pciutils perl perl-base perl-openssl-defaults php-cli php-common php-curl php-pgsql php-rrd php-ssh2 php-sybase pinentry-curses postgresql postgresql-client-common postgresql-common postgresql-contrib procps psmisc python-bareos python3 python3-bs4 python3-chardet python3-dev python3-distutils python3-lib2to3 python3-lxml python3-minimal python3-pip python3-pkg-resources python3-setuptools python3-soupsieve python3-wheel qemu-guest-agent readline-common rrdcached rrdtool rsyslog runit-helper sed sensible-utils shared-mime-info snmp snmpd sntp ssl-cert sudo sysstat systemd systemd-sysv sysvinit-utils tar task-english task-ssh-server tasksel tasksel-data thin-provisioning-tools tzdata ucf udev usbutils util-linux util-linux-locales vim vim-common vim-runtime vim-tiny wamerican wget whiptail x11-common x11-xkb-utils xauth xdg-user-dirs xfonts-75dpi xfonts-base xfonts-encodings xkb-data xserver-common xvfb xxd xz-utils zlib1g zlib1g-dev 677 upgraded, 95 newly installed, 46 to remove and 0 not upgraded. Need to get 475 MB of archives. After this operation, 1,195 MB of additional disk space will be used. Do you want to continue? [Y/n]
- For all questions, leave the default answer.
- For the question about GRUB it is important not to make a mistake and to tick the correct the correct VM boot disk. Otherwise the VM may stop booting.
Examples of questions asked
Answer with “Yes” then ENTER
The default answer is always 'N', so all you have to do is press ENTER.
The update is complete
Post-update restart of important modules
Disable the alerting system again
The Esia update automatically reactivates the alerting system. As long as you do not activate the Esia licence, you will not receive any alerts. However, once the licence has been activated, you may receive false positives.
It is therefore advisable to re-execute the following command before activating the licence.
- copy
chmod -x /usr/local/esia/plugins/alerting/*
Remove the old Debian bullseye packages
This step is necessary, in addition to saving disk space, keeping old versions of packages could :
- Cause bugs in Esia
- Cause problems with future updates.
It is therefore strongly recommended that you carry out this step even if your Esia is now working correctly. In addition, this also allows problems/bugs that would have occurred randomly later to be highlighted immediately.
- copy
apt autoremove
Then confirm the deletion.
Updating your Esia database
Use the following commands to update your database. Your Esia is currently running without this step. But if you ignore it, problems will occur in future updates.
Check the presence of the databases :
- copy
pg_lsclusters
Example
root@debian-bullseye:/# pg_lsclusters Ver Cluster Port Status Owner Data directory Log file 13 main 5432 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log 15 main 5433 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log
root@debian-bullseye:/# Delete the new database
- copy
pg_dropcluster 15 main --stop pg_lsclusters
For the pg_dropcluster be sure to set 15 and not 13!
Example
root@debian-bullseye:/# pg_dropcluster 15 main --stop Redirecting stop request to systemctl root@debian-bullseye:/# pg_lsclusters Ver Cluster Port Status Owner Data directory Log file 13 main 5432 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log root@debian-bullseye:/#
Copy the old database (from your Esia) to the new version
- copy
pg_upgradecluster 13 main pg_lsclusters
The first command takes some time to run. Once completed, the pg_lscluster shows this:
Example
root@debian-bullseye:/# pg_lsclusters Ver Cluster Port Status Owner Data directory Log file 13 main 5433 down postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log 15 main 5432 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log root@debian-bullseye:/#
To avoid bugs in Esia. The command below must be executed after an upgrade to postgresql15, which is your case here.
- copy
/usr/local/esia/sql/webp/ipam/run_postgres_15.sh
Then check that your web interface is working correctly.
Getting the Esia web interface to work
After installation, you need to run the following commands to get the web interface working again.
- copy
a2dismod php7.4 a2enmod php8.2 service apache2 restart apt remove php7.4 apt autoremove
Go to your Esia main web page
After the update, connect to your Esia server and refresh your browser cache (ctrl +F5 in Firefox). The menu button bugs will be corrected.
Essential tasks at the end of the update
Check if your VM restarts
Restart your VM and check that the restart works. A configuration error in GRUB or in the system update could mean that the VM no longer starts. Or that certain Esia services do not restart automatically.
It is necessary to perform this operation as long as the snapshot is sufficient to avoid losing too much data.
To reboot cleanly, enter the following command:
- copy
shutdown -r now
Check the status of your services
Some monitoring plugins may no longer work after the update. This is often the case when additional plugins have been manually installed. It is therefore advisable to check that these plugins are working in 2 ways:
Method 1: Check the status of nodes and services
Compare the current status of your nodes and services with the screenshot taken earlier. If there is a small or minimal difference, then the update has probably gone well.
If there is a large difference, either :
- There have been breakdowns in your infrastructure.
- Some of your plugins are no longer working after the update. (If this is the case, please contact our support team)
Method 2: Check for new alerts
Go to the current alerts page. If you have a lot of alerts, sort them by date.
You should have noted the start time of the update. Use this information to check the alerts that took place afterwards. For the most part, within 10 minutes of :
- licence activation.
- reboot of the machine.
These alerts can be caused by :
- A problem in your infrastructure.
- A malfunction of the plugin after the update.
Example:
Reactivate the alerting system
Once your Esia is working properly, don't forget to reactivate alerting:
Activation :
- copy
chmod +x /usr/local/esia/plugins/alerting/*
Check if it is activated :
- copy
ls --color -l /usr/local/esia/plugins/alerting/*
In the examples below, the green colour indicates that the scripts are executable. They are therefore activated.
Examples :
Alerting disabled
Alerting on
Now you need to check that you are receiving the alert emails.
- copy
/usr/local/esia/plugins/alerting/send_mail_html.pl -e min -t <votre adresse mail> -D
Check whether an email has arrived in your inbox.
Troubleshooting
All units are disconnected
The configuration of Esia's internal firewall may have removed the connection authorisation for the unitys. Type the following command line
- copy
iptables -L
If you don't find a line like:
ACCEPT tcp -- anywhere anywhere tcp dpt:2080
Type the following commands to open the port and save the configuration:
- copy
iptables -A INPUT -p tcp -m tcp --dport 2080 -j ACCEPT iptables-save > /etc/iptables.rules
The web page is inaccessible
Configuring php7 in Apache
Have you run the following command?
- copy
a2dismod php7.4 a2enmod php8.2 service apache2 restart
Check the status of the Apache2 service
- copy
service apache2 status
Example of a stopped Apache2 service :
Example of a started Apache2 service :
Try to restart the Apache2 service
- copy
service apache2 start service apache2 status
Cleaning
This little clean-up is not compulsory. It saves a lot of disk space. It is advisable to carry out the following steps once you are sure that everything has gone smoothly. You may even want towait several days after the update.