voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
80 stars 228 forks source link

The centos-release-scl package does not exist for RHEL #823

Closed ncstate-mafields closed 11 months ago

ncstate-mafields commented 2 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

class{ 'zabbix::agent':
    zabbix_package_state => present,
    zabbix_version       => '5.4',
    manage_firewall      => false,
    manage_repo          => true,
    service_ensure       => running,
    service_enable       => true,
    server               => $server,
    hostmetadata         => '',
    hostname             => $facts['networking']['fqdn'],
    serveractive         => "${server}:10051",
  }

What are you seeing

The centos-release-scl package is attempted to be installed, which fails because it does not exist on RHEL 7.

What behaviour did you expect instead

The centos-release-scl package is skipped for RHEL 7.

Output log

Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install centos-release-scl' returned 1: Error: Nothing to do
/Stage[main]/Zabbix::Repo/Package[zabbix-required-scl-repo]/ensure | change from 'purged' to 'latest' failed: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install centos-release-scl' returned 1: Error: Nothing to do

Any additional information you'd like to impart

Note that this only affects RHEL 7 specifically, the 9.2.0 release works fine on RHEL 8.

It looks like this bug has been around for a while, but it was previously isolated only to the zabbix::web class, so just using zabbix::agent sidestepped the issue. Since #801 the code was moved to the zabbix::repo class, which affects everything using the managed repo on RHEL 7.

It looks like this conditional just needs to check for the OS name to omit RHEL: https://github.com/voxpupuli/puppet-zabbix/blob/f4796f1439453610bc4f483a94247f6530313551/manifests/repo.pp#L85

Rathios commented 2 years ago

This one hit us too. I have a PR in the works but have to wait for this one to be merged first (fixes CI tests): https://github.com/voxpupuli/puppet-zabbix/pull/834

anthonysomerset commented 1 year ago

and i just hit this too....

i see that #834 is now merged also :)

evgeni commented 11 months ago

this has been fixed in #887