sensu / sensu-chef

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

Cookbook fails package install on amazon linux with Chef 13 #558

Closed mixtli closed 7 years ago

mixtli commented 7 years ago

Expected Behavior

Should install sensu

Current Behavior

Fails with: RuntimeError

     Unsupported Linux platform family amazon

     Cookbook Trace:
     ---------------
       /tmp/kitchen/cache/cookbooks/sensu/recipes/_linux.rb:63:in `from_file'
       /tmp/kitchen/cache/cookbooks/sensu/recipes/default.rb:34:in `from_file'
       /tmp/kitchen/cache/cookbooks/kamaji/recipes/sensu.rb:1:in `from_file'
       /tmp/kitchen/cache/cookbooks/kamaji/recipes/default.rb:27:in `from_file'

Possible Solution

Steps to Reproduce (for bugs)

Run default recipe using Chef 13+ on amazon linux

Your Environment

majormoses commented 7 years ago

It looks like amazon linux is not listed in the list of platfoms supported yet: https://github.com/sensu/sensu-chef#platforms

Taking a look at the code its being raised here: https://github.com/sensu/sensu-chef/blob/develop/recipes/_linux.rb#L69-L70 because there is no case statement for amazon, we might be able to just add amazon to rhel and fedora otherwise it needs it's own case with its own logic.

jeremysmitherman commented 7 years ago

Has anyone seen any updates on this?

majormoses commented 7 years ago

@jeremysmitherman @mixtli I can fork and add the cases to the existing statement and let you test, if it's more effort than that right now I do not have much bandwidth.

cwjohnston commented 7 years ago

@majormoses @jeremysmitherman I had previously committed a fix for this issue but forgot to open the PR. See #567. Note that even with the change in #567, installation on Amazon Linux is still broken as described in #560. A proposed fix for that specific issue is open in #565.

majormoses commented 7 years ago

@cwjohnston ok, cool I was gonna test that. Sounds like you first need to work out the repo side.