[chef] Re: Ohai netwrk interface cache.


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Ohai netwrk interface cache.
  • Date: Mon, 29 Apr 2013 08:04:11 -0700


On Monday, April 29, 2013 at 5:16 AM, wrote:

Hi

I have a problem with the network information being gathered by ohai. I am
trying to lookup the ip addrss by the network controller name (eth0 etc). When
I initially setup the server the network names were just the standard names.

But I have now changed the names of the network interfaces to make things
easier for me to track different networks and their connections.

Are you making these changes with chef and wish to see them reflected within the chef run?

However even though I have restarted the network interfaces and doing an
ifconfig brings up the correct names, when trying to get the ip address on the
new names, it fails. After some debugging it turns out that it is still
referencing the old network adapter names.

Is there a way to flush the ohai cache or tell it to get that information
again?
Ohai doesn't have a cache. It's information is fully refreshed on every chef run. If you need to refresh it within a chef run, see the ohai resource:

http://docs.opscode.com/chef/resources.html#ohai

If you need to debug what ohai is doing, you can run `ohai -l debug` on the command line.
 

Thanks in advance.

Kind Regards
Thanks.


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§