sensu-plugins / sensu-plugins-kubernetes

Sensu plugins for Kubernetes
http://sensu-plugins.io
MIT License
28 stars 36 forks source link

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

Open TC-robV opened 4 years ago

TC-robV commented 4 years ago

for 2 of the checks i get an error. all the other checks run fine.

this one i can't even get a help screen to show anything throws this.

check-kube-service-available.rb

Check failed to run: can't modify frozen String, ["/usr/local/bundle/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:315:in build_option_arguments'", "/usr/local/bundle/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:269:inblock (2 levels) in opt_parser'", "/usr/local/bundle/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:268:in each'", "/usr/local/bundle/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:268:inblock in opt_parser'", "/usr/local/lib/ruby/2.5.0/optparse.rb:1062:in initialize'", "/usr/local/bundle/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:263:innew'", "/usr/local/bundle/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:263:in opt_parser'", "/usr/local/bundle/gems/mixlib-cli-1.7.0/lib/mixlib/cli.rb:230:inparse_options'", "/usr/local/bundle/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:16:in initialize'", "/usr/local/bundle/gems/sensu-plugins-kubernetes-5.0.1/lib/sensu-plugins-kubernetes/cli.rb:82:ininitialize'", "/usr/local/bundle/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:58:in new'", "/usr/local/bundle/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:58:inblock in '"]

for this one i can get the help but once i pass in the url and token i get this.

check-kube-nodes-ready.rb -s https://kubernetes.default.svc/api --token-file /var/run/secrets/kubernetes.io/serviceaccount/token

Check failed to run: can't modify frozen String, ["/usr/local/bundle/gems/sensu-plugins-kubernetes-5.0.1/bin/check-kube-nodes-ready.rb:78:in rescue in run'", "/usr/local/bundle/gems/sensu-plugins-kubernetes-5.0.1/bin/check-kube-nodes-ready.rb:60:inrun'", "/usr/local/bundle/gems/sensu-plugin-4.0.0/lib/sensu-plugin/cli.rb:59:in `block in '"]

ruby -v ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

rgarcia89 commented 3 years ago

@TC-robV have you found a solution for this?