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

Network Plugin intermittently unable to detect ipaddress #1764

Open
demiph opened this issue Aug 10, 2022 · 0 comments
Open

Network Plugin intermittently unable to detect ipaddress #1764

demiph opened this issue Aug 10, 2022 · 0 comments

Comments

@demiph
Copy link

demiph commented Aug 10, 2022

We are sometimes unable to detect the IP address of MacOS servers using the ohai plugin intermittently. A subsequent ohai command would then produce the expected result. For the most part, we always get an IP address but on some instances. it returns a warning WARN: Plugin Network: unable to detect ipaddress

The expected behaviour is for the plugin to always return an IP address

This behaviour has been observed on MacOS nodes 10.15 and above, running chef client 17.10.3, and ohai 17.9.0

The nature of this behaviour is intermittent, the logs on the node do not show any activity stopping ohai from getting the IP address, and it never loses its ip address

An example of a case where we saw the issue is

node1:/ $ ohai ipaddress
[2022-08-10T21:11:17+00:00] WARN: Plugin Network: unable to detect ipaddress
/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai/system.rb:185:in `attributes_print': I cannot find an attribute named ipaddress! (ArgumentError)
	from /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai/application.rb:151:in `block in run_application'
	from /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai/application.rb:150:in `each'
	from /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai/application.rb:150:in `run_application'
	from /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai/application.rb:92:in `block in run'
	from /opt/chef/embedded/lib/ruby/3.0.0/benchmark.rb:308:in `realtime'
	from /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai/application.rb:90:in `run'
	from /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/bin/ohai:25:in `<top (required)>'
	from /usr/local/bin/ohai:160:in `load'
	from /usr/local/bin/ohai:160:in `<main>'
node1:/ $ ohai ipaddress
[
  "x.x.x.x"
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant