You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
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:
https://github.com/chef/chef/blob/6e0e0be6eb588434751ab4dcae86cca872858e8b/lib/chef/provider/package/yum/python_helper.rb#L47
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)
Context
I am simply trying to install/configure sensu (client) using the sensu cookbook. It doesn't work on RHEL8 nodes.
Your Environment
The text was updated successfully, but these errors were encountered: