sensu / sensu-chef

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

fix sensu process restarts when are added or modified #606

Closed majormoses closed 6 years ago

majormoses commented 6 years ago

fixes #564

Signed-off-by: Ben Abrams me@benabrams.it

Description

Fixes issues with creating or modifying resources in chef 13, unsure if this breaks compatibility with chef 12 if so we can check the version of chef and depending on the version we can access the appropriate namespace.

Motivation and Context

564

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist:

scalp42 commented 6 years ago

@majormoses took me a while for Chef 12 as it turns out I'm using more Chef 13/Ruby 2.4 features than I thought 🌵

Results on Ubuntu 16.04 (full destroy/converge for each Chef version with sensu_snippet :create => :delete => :create flow) :

Chef v14.0.190:

Without fix:

With fix:

Chef v13.8.5:

Without fix:

With fix:

Chef v12.22.3:

Without fix:

With fix:

TLDR: the PR works as intended 💯

majormoses commented 6 years ago

Thanks for testing!

released: https://supermarket.chef.io/cookbooks/sensu/versions/4.3.1