Install fails on RHEL8 clients
Opened this issue · 0 comments
Due to the fact that the _linux recipe expressly calls yum_package, which no longer works on RHEL8 due to migration to DNF, I get the following error:
* yum_package[sensu] action install[2020-09-10T16:35:03+00:00] INFO: Processing yum_package[sensu] action install (sensu::_linux line 82)
nil versions are discouraged and will be deprecated in Rubygems 4
================================================================================
Error executing action `install` on resource 'yum_package[sensu]'
================================================================================
Chef::Exceptions::Package
-------------------------
cannot find yum libraries, you may need to use dnf_package
Chef is usually smart enough to know which package manager to use, so the explicit call to yum_package seems unnecessary. If I modify this to just use "package" it works as expected since both yum and dnf can use the same yum repositories.
Expected Behavior
The recipe should install Sensu using "package" and allow chef-client to detect the proper package manager.
The recipe should install Sensu using "package" and allow chef-client to detect the proper package manager.
As you can see at:
this is expected behavior when you try to use yum_package on a system without the underlying python libraries for yum.
Current Behavior
You get the failure above.
Possible Solution
Simply update _linux to use package instead of yum_package and let chef-client use whichever is appropriate.
Steps to Reproduce (for bugs)
- Have a working yum respository set up by hand or your wrapper cookbook
- Run sensu::default
Context
I am simply trying to install/configure sensu (client) using the sensu cookbook. It doesn't work on RHEL8 nodes.
Your Environment
- Version of this cookbook used: 5.4.0 and 6.0.0
- Version of Sensu used: 1.9.0
- Version of Chef used: 16.4.41
- Operating System and version (e.g. CentOS 7, Ubuntu 14.04): RHEL 8.2
- Link to your project: www.ndpgroup.com