sensu / sensu-chef

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

Amazon Linux 2 support #596

Closed majormoses closed 6 years ago

majormoses commented 6 years ago

I'd guess there are some things that we need to adjust to properly support amazon2 as this moves to systemd which is the thing that I expect will break things, there probably needs to be some omnibus work done first but we need to consider all the times we check platform family and similar here.

https://aws.amazon.com/about-aws/whats-new/2017/12/introducing-amazon-linux-2

tas50 commented 6 years ago

You can check node['init_package'] within your platform checks. On any system with systemd it'll be 'systemd'.

majormoses commented 6 years ago

That has been super unreliable on the whole, this is partially due to a couple of reasons:

See: https://github.com/chef/ohai/issues/917

adhodgson1 commented 6 years ago

Not related to Sensu necessairily but I have checked several Chef cookbooks on AWS Linux2 and several of them brake due to the platform check. I haven't had time to look into this further but just ran a few tests. Currently I am getting stuff like this firing:

if node['platform_version'].to_i <= 5

This currently equates to true on AWS Linux2 so any cookbook that uses similar (and there seems to be quite a few) currently brakes.

Andrew.

majormoses commented 6 years ago

resolved in #614