Hi
I am not making the changes within chef they have been done outside chef. Thanks for the debug info. Although it has not helped me out.
If I explain the exact steps, I am taking, it might make things easier :)
1) The network names have been changed by editing the ifcfg-NAME files. A network name routes specific file has also been added for all new interfaces. The OS is Red Hat Enterprise 5
2) An ifconfig lists the updated names and IP addresses.
3) Running ohai on the server I can see the new network card name in the network json object. (network[:interfaces])
4) In my chef recipe I am going through each node, except the logserver, pseudo code below:
servers = search (:node , "(NOT role:logserver)")
servers.each do |server|
puts server['network']['interfaces'].keys
# Code here that fails as it can't find the network name in the above hash.
end
5) I am expecting to see printed out above the exception the network names which ifconfig and the ohai command line app are reporting. However I am seeing the original eth0, eth1 names.
If ohai does not cache any information, what else could be going on? I have restarted chef-server, but that had no effect.