Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails on RHEL8 clients #634

Open
jmercier-ndp opened this issue Sep 10, 2020 · 0 comments
Open

Install fails on RHEL8 clients #634

jmercier-ndp opened this issue Sep 10, 2020 · 0 comments

Comments

@jmercier-ndp
Copy link

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:

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)

  1. Have a working yum respository set up by hand or your wrapper cookbook
  2. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant