Update Icinga 2.10.5-1

Hello everybody,

when updating to Icinga version 2.10.5-1 from 2.10.4-1, the following error occurs:

Processing Dependency: libyajl.so.2()(64bit) for package: icinga2-bin-2.10.5-1.el7.icinga.x86_64
Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 239, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1198, in buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 893, in resolveDeps
    CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1025, in _resolveRequires
    (checkdep, missing, errormsgs) = self._processReq(po, dep)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 350, in _processReq
    CheckDeps, missingdep = self._requiringFromTransaction(po, requirement, errormsgs)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 680, in _requiringFromTransaction
    rel=pkg.rel)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 5280, in update
    availpkgs = self._compare_providers(availpkgs, requiringPo)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1648, in _compare_providers
    bestnum = max(pkgresults.values())
ValueError: max() arg is an empty sequence
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager

Operating system used: Redhat Server 7.6

Called command: yum -y update

Repos: /etc/yum.repos.d/

Icinga-release.repo

[Icinga-stable-release]
name = ICINGA (stable release for epel)
baseurl = http: //packages.icinga.com/epel/$releasever/release/
enabled = 1
gpgcheck = 1
gpgkey = file: /// etc / pki / rpm-gpg / RPM-GPG-KEY-icinga

Icinga-snapshot.repo

[Icinga-snapshot-builds]
name = ICINGA (snapshot builds for epel)
baseurl = http: //packages.icinga.com/epel/$releasever/snapshot/
enabled = 0
gpgcheck = 1
gpgkey = file: /// etc / pki / rpm-gpg / RPM-GPG-KEY-icinga
metadata_expire = 1d

Thank you for your help

I never seen this kind of error! It is an error inside YUM’s dependency resolver.

I’d suggest the following:

yum clean all
rm -rf /var/cache/yum/*
yum makecache fast

yum install icinga2

Is this the only system where you have this problem?

1 Like

Not quite, the update is to be rolled out on about 300 systems. I only used one as a test. RedHat 7.6 is in use on all systems. The commands did not help:

yum clean all
rm -rf / var / cache / yum / *
yum makecache almost

and then

yum update -y or yum install icinga2

yum install icinga2
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
rhel-7-server-devtools-rpms                                                                                                                                                                                           | 2.3 kB  00:00:00
rhel-7-server-rpms                                                                                                                                                                                                    | 2.0 kB  00:00:00
rhel-7-server-satellite-tools-6.3-puppet4-rpms                                                                                                                                                                        | 2.1 kB  00:00:00
rhel-7-server-satellite-tools-6.3-rpms                                                                                                                                                                                | 2.1 kB  00:00:00
rhel-server-rhscl-7-rpms                                                                                                                                                                                              | 2.0 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package icinga2.x86_64 0:2.10.4-1.el7.icinga will be updated
---> Package icinga2.x86_64 0:2.10.5-1.el7.icinga will be an update
--> Processing Dependency: icinga2-bin = 2.10.5-1.el7.icinga for package: icinga2-2.10.5-1.el7.icinga.x86_64
--> Processing Dependency: icinga2-common = 2.10.5-1.el7.icinga for package: icinga2-2.10.5-1.el7.icinga.x86_64
--> Running transaction check
---> Package icinga2-bin.x86_64 0:2.10.4-1.el7.icinga will be updated
--> Processing Dependency: icinga2-bin = 2.10.4-1.el7.icinga for package: icinga2-ido-mysql-2.10.4-1.el7.icinga.x86_64
---> Package icinga2-bin.x86_64 0:2.10.5-1.el7.icinga will be an update
--> Processing Dependency: libyajl.so.2()(64bit) for package: icinga2-bin-2.10.5-1.el7.icinga.x86_64
Traceback (most recent call last):
  File "/bin/yum", line 29, in 
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 239, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1198, in buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 893, in resolveDeps
    CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1025, in _resolveRequires
    (checkdep, missing, errormsgs) = self._processReq(po, dep)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 350, in _processReq
    CheckDeps, missingdep = self._requiringFromTransaction(po, requirement, errormsgs)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 680, in _requiringFromTransaction
    rel=pkg.rel)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 5280, in update
    availpkgs = self._compare_providers(availpkgs, requiringPo)
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 1648, in _compare_providers
    bestnum = max(pkgresults.values())
ValueError: max() arg is an empty sequence
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager

yail is provided with EPEL, and for some reason your yum doesn’t find it. The python stacktrace looks very strange, this is a bug within yum you should report to RedHat.

Thank you for your help. We opened a bug on RedHat and tracked it through BugZilla

Can you please provide a link to it? We’ve the same error.

Here is the Link to Bugzilla

https://bugzilla.redhat.com/show_bug.cgi?id=1713649

Just making sure something simple wasn’t missed here, but can you make sure EPEL is installed and enabled in /etc/yum.repos.d/ ? When looking at your yum update output, it’s not updating that repo.

1 Like

Why EPEL? According to yum whatprovides yajl it’s from the base repository. To me it also looks like a yum bug.

root@monitoring-frontend:~# yum whatprovides yajl
yajl-2.0.4-4.el7.i686 : Yet Another JSON Library (YAJL)
Quelle : base

yajl-2.0.4-4.el7.x86_64 : Yet Another JSON Library (YAJL)
Quelle : base

root@monitoring-frontend:~# yum makecache all
EPEL | 2.9 kB 00:00:00
ICINGA | 2.9 kB 00:00:00
base | 3.3 kB 00:00:00
centos-sclo-rh | 3.0 kB 00:00:00
centos-sclo-sclo | 2.9 kB 00:00:00
extras | 2.9 kB 00:00:00
gfit | 2.9 kB 00:00:00
grafana/signature | 488 B 00:00:00
grafana/signature | 2.9 kB 00:00:00 !!!
icinga-stable-release | 2.9 kB 00:00:00
rkom-repo | 2.9 kB 00:00:00
updates | 3.3 kB 00:00:00
Metadaten-Zwischenspeicher erstellt
root@monitoring-frontend:~# yum upgrade
AbhÀngigkeiten werden aufgelöst
→ TransaktionsprĂŒfung wird ausgefĂŒhrt
—> Paket grafana.x86_64 0:6.2.0-1 markiert, um aktualisiert zu werden
—> Paket grafana.x86_64 0:6.2.1-1 markiert, um eine Aktualisierung zu werden
—> Paket icinga2.x86_64 0:2.10.4-1.el7.icinga markiert, um aktualisiert zu werden
—> Paket icinga2.x86_64 0:2.10.5-1.el7.icinga markiert, um eine Aktualisierung zu werden
—> Paket icinga2-bin.x86_64 0:2.10.4-1.el7.icinga markiert, um aktualisiert zu werden
—> Paket icinga2-bin.x86_64 0:2.10.5-1.el7.icinga markiert, um eine Aktualisierung zu werden
→ AbhĂ€ngigkeit libyajl.so.2()(64bit) wird fĂŒr Paket icinga2-bin-2.10.5-1.el7.icinga.x86_64 verarbeitet
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 375, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 239, in main
(result, resultmsgs) = base.buildTransaction()
File “/usr/lib/python2.7/site-packages/yum/init.py”, line 1198, in buildTransaction
(rescode, restring) = self.resolveDeps()
File “/usr/lib/python2.7/site-packages/yum/depsolve.py”, line 893, in resolveDeps
CheckDeps, checkinstalls, checkremoves, missing = self._resolveRequires(errors)
File “/usr/lib/python2.7/site-packages/yum/depsolve.py”, line 1025, in _resolveRequires
(checkdep, missing, errormsgs) = self._processReq(po, dep)
File “/usr/lib/python2.7/site-packages/yum/depsolve.py”, line 350, in _processReq
CheckDeps, missingdep = self._requiringFromTransaction(po, requirement, errormsgs)
File “/usr/lib/python2.7/site-packages/yum/depsolve.py”, line 680, in _requiringFromTransaction
rel=pkg.rel)
File “/usr/lib/python2.7/site-packages/yum/init.py”, line 5280, in update
availpkgs = self._compare_providers(availpkgs, requiringPo)
File “/usr/lib/python2.7/site-packages/yum/depsolve.py”, line 1648, in _compare_providers
bestnum = max(pkgresults.values())
ValueError: max() arg is an empty sequence

I have no problems with a fresh and updated RHEL 7.6. Installed 2.10.4 and then updated to 2.10.5

What happens when you execute this command:

yum whatprovides 'libyajl.so.2()(64bit)'
1 Like

That’s the Response:
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-
: disabled-repos, subscription-manager
icinga2-libs-2.8.4-1.el7.icinga.x86_64 : Libraries for Icinga 2
Repo : Test_Test_Extra_Packages_Test_Extra_Packages_Yum_Repo_EL7
Matched from:
Provides : libyajl.so.2()(64bit)

yajl-2.0.4-4.el7.x86_64 : Yet Another JSON Library (YAJL)
Repo : rhel-7-server-rpms
Matched from:
Provides : libyajl.so.2()(64bit)

Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager

That looks like a broken installation, since icinga2-libs is old and stale. Purge that package, re-run yum makecache and do the upgrade again.

No we had shipped that at some point. Since it is still in our repository it is listed.

Anyway yum shouldn’t crash like that. I have no idea why

Stange. I’ve killed two machines in my setup: One server where Icinga don’t want to upgrade (Server A) and another one which upgraded without problems (Server B).

Server A and B are identical in their setup at first. Some extra repos are added for Icingaweb2 on Server A. Server A refuses to install icinga2-bin. Server B does the it without problems. When I remove the extra repos from Server A (so both server have the exact same repo config) and do a yum clean all and a yum makecache all icinga2-bin still won’t be installed.

I’ve spawned a plain CentOS 7 docker container, installed the Icinga Repo, installed epel-release and was able to install icinga2. I removed every repo from Server A and copied all repos from the docker container onto it. Rerun the yum clean all, rm -rf /var/cache/yum/* and yum makecache all part and icinga2-bin still won’t install.

The only difference I noted: In the docker container and Server B there is a @ sign in the yum whatprovides in front of base. On Server A it’s missing.

This must be a yum bug. However I’ve abolutely no idea what to do next.

Try to blacklist/exclude icinga2-libs from yum, like shown here.

1 Like

Deployed the icinga2 snapshot release repo. Then I installed icinga2 from there. Afterwards I removed icinga2* and the repo and installed icinga2 without any problems then from the regular repository :slight_smile:

I’ve tried yum -x icinga2-libs install icinga2 like you suggested and it worked. I’ve excluded it now. Still strange.

1 Like

I can only assume this is an issue in resolver involved with Replace/Conflict.

We removed the icinga2-libs package beginning with 2.10, via a Conflict rule.

This also causes problems installing older Icinga releases, since yum assumes the conflict from the latest packages, instead of the target package.

I suggest solving this by excluding icinga2-libs:

  • On upgrade / install
  • In the repository definition
  • On satellite when mirroring our repository

Only measure on our side would be to remove old packages from the repository, which I prefer not to do.

1 Like

When I also ran into this issue today, I discovered that the following also might help as a workaround:

# Install dependency manually
yum install yajl

# Run updates on icinga2
yum update icinga2