You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I was debugging a failure to initialize node['shard_seed'] on a Darwin host. The host was running Big Sur and chef 16.2.50, but I believe the issue still applies to the the latest ohai plugins. While debugging the problem I discovered that the Hardware ohai plugin was not setting any properties. Digging into the problem I discovered that running system_profiler SPHardwareDataType -xml on a Big Sur host can take minutes (other system_profiler subcommands still run in a reasonable amount of time). But when running this specific command took to long, the command would timeout, which would cause the plugin to abort, which resulted in no hardware properties being set. It seems like the darwin hardware ohai plugin (see chef/ohai/lib/ohai/plugins/darwin/hardware.rb) should handle timeouts triggered by subcommands. A fix for this might look something like this.
The text was updated successfully, but these errors were encountered:
system_profiler does have a -timeout option that could be used when compiling the hardware hash but I don't know what would be considered a sane default.
Recently I was debugging a failure to initialize node['shard_seed'] on a Darwin host. The host was running Big Sur and chef 16.2.50, but I believe the issue still applies to the the latest ohai plugins. While debugging the problem I discovered that the Hardware ohai plugin was not setting any properties. Digging into the problem I discovered that running
system_profiler SPHardwareDataType -xml
on a Big Sur host can take minutes (othersystem_profiler
subcommands still run in a reasonable amount of time). But when running this specific command took to long, the command would timeout, which would cause the plugin to abort, which resulted in nohardware
properties being set. It seems like the darwin hardware ohai plugin (see chef/ohai/lib/ohai/plugins/darwin/hardware.rb) should handle timeouts triggered by subcommands. A fix for this might look something like this.The text was updated successfully, but these errors were encountered: