sensu-plugins / sensu-plugins-io-checks

This plugin provides native system I/O instrumentation for metrics collection via the system `ioping` utility.
http://sensu-plugins.io
MIT License
1 stars 9 forks source link

Check failed to run: can't modify frozen String #47

Closed soichih closed 4 years ago

soichih commented 4 years ago

This plugin generates the following error message on fresh sensu install on Ubuntu 18.04.

root@slurm7b:/opt/sensu/embedded/bin# ./metrics-ioping.rb 
Check failed to run: can't modify frozen String, ["/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:315:in `build_option_arguments'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:269:in `block (2 levels) in opt_parser'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:268:in `each'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:268:in `block in opt_parser'", "/opt/sensu/embedded/lib/ruby/2.4.0/optparse.rb:1062:in `initialize'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:263:in `new'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:263:in `opt_parser'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:230:in `parse_options'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:16:in `initialize'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:58:in `new'", "/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:58:in `block in <class:CLI>'"]

I've done the following to install this plugin

$ apt install sensu
$ /opt/sensu/embedded/bin/gem install --no-user-install sensu-plugins-io-checks

Is there a better way to install this?

jspaleta commented 4 years ago

This is probably a bug related to rubocop suggested changes. Let me see if I can fix this.