Nodes returned from search are missing attributes from ohai?
jwmarshall opened this issue · 3 comments
I have a cookbook that relies on search to build hostsfile entries for all nodes in the environment. In my case I need to pull the private network interface address out of the node attributes, but for some reason this fails for all the ways I've tested it. Even the ['ipaddress'] attribute of a returned node seems to be nil. I've checked the temp files created by kitchen-nodes and it has all the expected ohai information, but I cannot seem to access them in my chef recipes. Any idea what the issue might be? I can try to provide an example if its not already something youre testing for, unfortunately I cannot share my existing cookbook.
Ok after some more testing I am getting the correct value from the ['ipaddress'] attribute on a node search. However the ['network'] attribute is nil.
I figured out my problem!
@jwmarshall what was your solution? Currently also encountering a nil
network attribute.