Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All sorts of warning messages with check-chef-nodes.rb #29

Open
dsemarketer opened this issue Jul 18, 2017 · 3 comments
Open

All sorts of warning messages with check-chef-nodes.rb #29

dsemarketer opened this issue Jul 18, 2017 · 3 comments

Comments

@dsemarketer
Copy link

Running Sensu 0.29.0-11 on Windows, embedded Ruby (2.4.0), sensu-plugins-chef v3.0.2

When running the check the following is outputted:

c:/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/request/retry.rb:30: warning: constant ::Fixnum is deprecated
c:/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/request/retry.rb:30: warning: constant ::Fixnum is deprecated
c:/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/request/retry.rb:30: warning: constant ::Fixnum is deprecated
c:/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/faraday-0.9.2/lib/faraday/request/retry.rb:30: warning: constant ::Fixnum is deprecated
W, [2017-07-18T10:16:55.636371 #5764] WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-07-18T10:16:55.686058 #5764] WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-07-18T10:16:55.696250 #5764] WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-07-18T10:16:55.914978 #5764] WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-07-18T10:16:55.914978 #5764] WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
(Then the check's output)

This began with updating Sensu to 0.29.0-11, most likely its with their update to Ruby 2.4.0. Previously running Sensu 0.26.0 with the v0.0.6 of this plugin had no issues. 0.0.6 throws install errors now as does the 1.x and 2.x versions. Again, probably due to Ruby 2.4.0

Any way to either fix or suppress these messages?

@majormoses
Copy link
Member

majormoses commented Jul 18, 2017

@dsemarketer ya this is something that has plagued many things that rely on ridley and varia. I have already suppressed several of these here: #27 looks like there are more to supress, I would guess for faraday we are looking at a dependency bump. I'd like to fix this too as I also use this check (I don't have the faraday warnings because I am still on 0.26 but the other is annoying. If you can provide some sleuthing on this warning we can see if we can suppress it ourselves or even better bump a dependency to make those go away without breaking anything that would help.

@facastagnini
Copy link

Similar errors running Sensu 0.28.4-1 on Linux, embedded Ruby (2.3.0p0), sensu-plugins-chef v5.0.0

W, [2018-02-08T18:44:20.191609 #8204]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2018-02-08T18:44:20.191774 #8204]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2018-02-08T18:44:20.191856 #8204]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2018-02-08T18:44:20.231531 #8204]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2018-02-08T18:44:20.231654 #8204]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method

@facastagnini
Copy link

facastagnini commented Feb 8, 2018

According to berkshelf/berkshelf#1668

Long term solution would probably be to remove buff-config/varia_model and the hashie dep in favor of Chef::Config and Chef::Mash objects.

related, replacing deprecated ridley dep #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants