sensu / sensu-chef

Sensu Chef cookbook.
https://supermarket.chef.io/cookbooks/sensu
Apache License 2.0
222 stars 280 forks source link

Installation cannot proceed on Amazon Linux as of release ~4.0.0 #560

Closed heffergm closed 7 years ago

heffergm commented 7 years ago

Expected Behavior

Installation of sensu client packages should complete as under previous cookbook versions

Current Behavior

Using cookbook version 4.0.0 to attempt to install sensu client on Amazon Linux fails. The issue stems from the addition of the variable $releasever to package url in /etc/yum.repos.d/sensu.repo. In the case of Amazon Linux:

 'basearch': 'x86_64',
 'releasever': '2016.09',

This results in the following error, since http://repositories.sensuapp.org/yum/2016.09/x86_64/repodata/repomd.xml doesn't exist:

================================================================================
Error executing action `run` on resource 'execute[yum-makecache-sensu]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of yum -q -y makecache --disablerepo=* --enablerepo=sensu ----
STDOUT:
STDERR: http://repositories.sensuapp.org/yum/2016.09/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.

Steps to Reproduce (for bugs)

Using sensu-chef 4.0.0, attempt to install sensu client on an AWS Linux instance.

Context

Currently unable to upgrade past sensu 0.26.5-2.

Your Environment

cwjohnston commented 7 years ago

Hi @heffergm

Version 4.0.2 of this cookbook has been released to the Supermarket. Using this new release you can specify a value for node["sensu"]["yum_repo_releasever"] which will override the $releasever yum variable in the rendered yum repository configuration. Hope this helps!

heffergm commented 7 years ago

👍