sensu / sensu-ansible

An Ansible role to deploy a fully dynamic Sensu stack!
https://ansible-sensu.readthedocs.io
MIT License
126 stars 96 forks source link

Feature/erlang breaks the world #181

Closed jaredledvina closed 6 years ago

jaredledvina commented 6 years ago

If this build goes through, this should close out https://github.com/sensu/sensu-ansible/issues/180

Short version: Erlang 21.X was released and is not support yet by RabbitMQ, this re-configures apt distro's to use pinning to prevent them from upgrading as they install from Erlang Solutions. This isn't an issue for yum distro's as they use the Zero dep RPM's from RabbitMQ directly. This change also updates the yum distro's to use Erlang 20.3.X to match apt distro's per http://www.rabbitmq.com/which-erlang.html#unsupported%20versions and cleans up a lot of logic across everything.

jaredledvina commented 6 years ago

Alright, I've been doing some local testing, the latest commits should work (I hope...) I've had to disable the tests for amazonlinux from blocking the build as currently, detection for AmazonLinux 2 is broken resulting in:

/opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/helpers/os_linux.rb:16:in `redhatish_version': undefined method `[]' for nil:NilClass (NoMethodError)
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/specifications/os.rb:194:in `block in load'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `each'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:60:in `scan_family_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:51:in `block in scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `each'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:60:in `scan_family_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:51:in `block in scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `each'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:60:in `scan_family_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:51:in `block in scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `each'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:33:in `block in scan'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:27:in `each'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect/scanner.rb:27:in `scan'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/platforms/detect.rb:9:in `scan'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/plugins/base_connection.rb:100:in `platform'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/transports/local.rb:46:in `select_runner'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/transports/local.rb:27:in `initialize'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/transports/local.rb:17:in `new'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.15/lib/train/transports/local.rb:17:in `connection'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.16/lib/inspec/backend.rb:51:in `create'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.16/lib/inspec/runner.rb:67:in `configure_transport'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.16/lib/inspec/runner.rb:59:in `initialize'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.16/lib/inspec/cli.rb:165:in `new'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.16/lib/inspec/cli.rb:165:in `exec'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    from /opt/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.16/bin/inspec:12:in `<top (required)>'
    from /opt/inspec/bin/inspec:137:in `load'
    from /opt/inspec/bin/inspec:137:in `<main>'

Already fixed in https://github.com/inspec/train/pull/312 but, train v 1.4.16 has the fix so, we need https://github.com/inspec/inspec/blob/master/inspec.gemspec#L29 to be bumped and another Inspec release before those will pass. (https://github.com/inspec/train/compare/v1.4.15...v1.4.16)

I think it's sane to not block on Amazonlinux build failures for the time being to fix the role to no longer have RabbitMQ installations break on Debian based systems.

jaredledvina commented 6 years ago

bingo, we're all set here, merging!