Page 1 of 1

Upgrade Script Issues

Posted: Mon Aug 24, 2020 8:50 am
by dbcummings
Hello,

I am trying to upgrade from Nagios 5.6.6 to 5.7.2 using the offline installer. The upgrade script is generating the following error:

package nagiosxi-shellinabox-5.7.2-2.el7.x86_64.rpm is not installed
Loaded plugins: langpacks
Examining nagiosxi-shellinabox-5.7.2-2.el7.x86_64.rpm: nagiosxi-shellinabox-5.7.2-2.el7.x86_64
Marking nagiosxi-shellinabox-5.7.2-2.el7.x86_64.rpm as an update to nagiosxi-shellinabox-5.6.6-1.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package nagiosxi-shellinabox.x86_64 0:5.6.6-1.el7 will be updated
--> Processing Dependency: nagiosxi-shellinabox(x86-64) = 5.6.6-1.el7 for package: nagiosxi-5.6.6-1.el7.x86_64
---> Package nagiosxi-shellinabox.x86_64 0:5.7.2-2.el7 will be an update
--> Finished Dependency Resolution
Error: Package: nagiosxi-5.6.6-1.el7.x86_64 (@/nagiosxi-5.6.6-1.el7.x86_64)
Requires: nagiosxi-shellinabox(x86-64) = 5.6.6-1.el7
Removing: nagiosxi-shellinabox-5.6.6-1.el7.x86_64 (@/nagiosxi-shellinabox-5.6.6-1.el7.x86_64)
nagiosxi-shellinabox(x86-64) = 5.6.6-1.el7
Updated By: nagiosxi-shellinabox-5.7.2-2.el7.x86_64 (/nagiosxi-shellinabox-5.7.2-2.el7.x86_64)
nagiosxi-shellinabox(x86-64) = 5.7.2-2.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Re: Upgrade Script Issues

Posted: Mon Aug 24, 2020 9:12 am
by scottwilkerson
I think there is a bug in the version of the offline installer you have

From the dir with the RPM's instead of running the upgrade script, run the following

Code: Select all

yum -y --nogpgcheck localupdate *.rpm

Re: Upgrade Script Issues

Posted: Mon Aug 24, 2020 9:18 am
by dbcummings
Will there be a new offline installer package built? We are testing the upgrade process to certify it for our production upgrade. This is a big process and I want to test with the method we will use in production.

Re: Upgrade Script Issues

Posted: Mon Aug 24, 2020 9:41 am
by scottwilkerson
dbcummings wrote:Will there be a new offline installer package built? We are testing the upgrade process to certify it for our production upgrade. This is a big process and I want to test with the method we will use in production.
I've notified our dev team and after testing they will likely put out a new tarball.

I believe the upgrade script need to be changed to the following

Code: Select all

#!/bin/sh -e

# Import gpg key
if [ ! -f /etc/pki/rpm-gpg/GPG-KEY-NAGIOS-V2 ]; then
	/bin/cp -f GPG-KEY-NAGIOS-V2 /etc/pki/rpm-gpg/GPG-KEY-NAGIOS-V2
	rpm --import GPG-KEY-NAGIOS-V2
fi

# Install packages that may not be installed yet
if ! rpm -q nagiosxi-shellinabox; then
	yum -y --nogpgcheck localinstall nagiosxi-shellinabox*.rpm
fi 
if ! rpm -q nagiosxi-nxti; then
	yum -y --nogpgcheck localinstall nagiosxi-nxti*.rpm
fi
if ! rpm -q perl-Nagios-Monitoring-Plugin && ! grep -q '8.' /etc/redhat-release; then
	yum -y --nogpgcheck localinstall perl-Nagios-Monitoring-Plugin*.rpm
fi

# Do local install of packages
yum -y --nogpgcheck localupdate *.rpm

Re: Upgrade Script Issues

Posted: Mon Aug 24, 2020 10:16 am
by scottwilkerson
Our development team has tested and updated the tarball with the changes

Code: Select all

https://repo.nagios.com/nagiosxi-offline/nagiosxi-5.7.2-2.el7.x86_64.tar.gz

Re: Upgrade Script Issues

Posted: Mon Aug 24, 2020 10:32 am
by dbcummings
I ran the script with this update. It was successful. However, there are issues with ndomod.o but I have opened another post on that.

#!/bin/sh -e

# Import gpg key
if [ ! -f /etc/pki/rpm-gpg/GPG-KEY-NAGIOS-V2 ]; then
/bin/cp -f GPG-KEY-NAGIOS-V2 /etc/pki/rpm-gpg/GPG-KEY-NAGIOS-V2
rpm --import GPG-KEY-NAGIOS-V2
fi

# Install packages that may not be installed yet
if ! rpm -q nagiosxi-shellinabox; then
yum -y --nogpgcheck localinstall nagiosxi-shellinabox*.rpm
fi
if ! rpm -q nagiosxi-nxti; then
yum -y --nogpgcheck localinstall nagiosxi-nxti*.rpm
fi
if ! rpm -q perl-Nagios-Monitoring-Plugin && ! grep -q '8.' /etc/redhat-release; then
yum -y --nogpgcheck localinstall perl-Nagios-Monitoring-Plugin*.rpm
fi

# Do local install of packages
yum -y --nogpgcheck localupdate *.rpm

Re: Upgrade Script Issues

Posted: Mon Aug 24, 2020 10:39 am
by scottwilkerson
Thanks for confirming and opening a different thread for the new issue

Closing thread