CentOS7 yum upgrade insists on 2.12

So this works in a Docker container from scratch using CentOS 7.8, but it doesn’t work on my masters running 7.8 on 2.10.5 or my test server on CentOS7.7 with 2.11.4.

I’m trying to upgrade my masters to 2.11.5 from 2.10.5, I’m being very specific:
yum install icinga2-2.11.5-1.el7.icinga

What happens is this:

--> Processing Dependency: icinga2-bin = 2.12.0-1.el7.icinga for package: icinga2-ido-pgsql-2.12.0-1.el7.icinga.x86_64
--> Running transaction check
---> Package boost169-chrono.x86_64 0:1.69.0-2.el7 will be installed
---> Package icinga2.x86_64 0:2.10.5-1.el7.icinga will be updated
---> Package icinga2.x86_64 0:2.10.5-1.el7.icinga will be updated
---> Package icinga2.x86_64 0:2.11.5-1.el7.icinga will be an update
---> Package icinga2.x86_64 0:2.12.0-1.el7.icinga will be an update
--> Processing Dependency: icinga2-common = 2.12.0-1.el7.icinga for package: icinga2-2.12.0-1.el7.icinga.x86_64
---> Package icinga2-bin.x86_64 0:2.10.5-1.el7.icinga will be updated
---> Package icinga2-bin.x86_64 0:2.10.5-1.el7.icinga will be updated
---> Package icinga2-bin.x86_64 0:2.11.5-1.el7.icinga will be an update
---> Package icinga2-bin.x86_64 0:2.12.0-1.el7.icinga will be an update
--> Running transaction check
---> Package icinga2-common.x86_64 0:2.10.5-1.el7.icinga will be updated
---> Package icinga2-common.x86_64 0:2.10.5-1.el7.icinga will be updated
---> Package icinga2-common.x86_64 0:2.11.5-1.el7.icinga will be an update
---> Package icinga2-common.x86_64 0:2.12.0-1.el7.icinga will be an update
--> Finished Dependency Resolution

My entire infrastructure is on 2.10 so I’m trying not to leap frog over 2.11. This interestingly enough isn’t a problem with CentOS6 servers I have either. Not clear on why that exact command is working in docker. I even tried rsync’ing the yum repos from the production server to a container and it worked.

Anyone seen this so far?

Not very experienced with yum and haven’t had this myself.
What about locking icinga2 to v2.11.5?
Internet search suggested yum-plugin-versionlock

It seems that yum will notice the dependencies need to be updated and for some reason decides that 2.12 must therefore be used.

You could try specifying all dependencies manually: yum upgrade icinga2-2.11.5 icinga2-bin-2.11.5 icinga2-common-2.11.5 (you may also have to tack icinga2-ido-mysql-2.11.5 onto the end of that.).

The thing that weirdly worked for me was doing yum upgrade icinga2 and letting it upgrade everything to 2.12, then doing yum downgrade icinga2 icinga2-bin icinga2-common icinga2-ido-mysql, which got me onto 2.11.5 for the core package and all dependencies.

1 Like

Your solution is right, with how yum/dnf resolves dependencies it will always result in this behavior if a newer version is already in the repositories. Specifying all packages with a version number will fix this.

Another option is version locking with the yum/dnf plugin versionlock, which I would only use if I really insist on one specific version.

A less hard version locking could be done with an exclude entry in yum.conf/dnf.conf (or the icinga repo configuration) like exclude=*icinga2*2.12*.

1 Like

So I had tried this, but just not with the database piece:

yum install icinga2-2.11.5 icinga2-bin-2.11.5 icinga2-common-2.11.5 icinga2-ido-pgsql-2.11.5

I just tried this on my test box and it worked. Caught me off guard because my installer script I use has just been doing yum install icinga2-2.10.5 for a year with no quirks. The database piece is what’s unique about the masters.

Thanks for your help!