puppet-zabbix
puppet-zabbix copied to clipboard
The centos-release-scl package does not exist for RHEL
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 7.17.0
- Ruby: 2.7.6
- Distribution: RHEL 7
- Module version: 9.2.0
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
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
and i just hit this too....
i see that #834 is now merged also :)
this has been fixed in #887