-
Notifications
You must be signed in to change notification settings - Fork 450
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
node['dmi']['system']['manufacturer'] missing #1414
Comments
@zmscwx Can you post the output of dmidecode on this host? |
I don't think the /full/ output would be feasible, since it's more than I can fit in my scrollback buffer. The pertinent bits are here: "broken" system
"good" system
|
@zmscwx I think it would be helpful if you could paste the entire output of Alternatively, run ohai directly to get the dmi system section of the json. E.g., on my system I did this and it is working as expected:
|
@sshock I can confirm that /ohai/ works as intended - it's specifically in the context of the Chef run that dmi.system appears to be getting clobbered. You can see even in my simple repro case that I had to resort to using chef-shell. To be perfectly clear, If you still think the full output of dmidecode would be useful, I'll be glad to upload it. Let me know, and I'll spin up some more test instances. |
Sorry - I must have missed that last response. Here's the chef-shell output - Note that when compared with the
vs.
|
I have the same issue and I think this is caused by : Added a debug log to print
The |
Interesting. Would updating chef/ohai to use |
This patch looks to fix the issue:
|
@zmscwx your approach looks better, this also fix the issue:
|
We really should have been using kind_of (or is_a) the whole time. This approach seems entirely appropriate to me. Thanks for digging into this. |
gladly! thank you for the quick turnaround. |
👍 |
Description
Software that depends on keys placed directly in node['dmi']['system'] (as opposed to node['dmi']['system']['all_records'][0]) is failing. This affects Ohai (the virtualization plugin, specifically), and by proxy chef-sugar.
Chef Version
15.5.x and later
Platform Version
EL6 and 7
Replication Case
Run chef-shell and check the contents of node['dmi']['system'] - node['dmi']['system']['manufacturer'] should be present.
Client Output
Expected:
Actual:
Stacktrace
The text was updated successfully, but these errors were encountered: