Skip to content
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

Darwin Hardware ohai plugin can timeout on Big Sur and not set any properties. #1603

Open
epilatow opened this issue Jan 28, 2021 · 1 comment
Labels
Focus: Desktop Issues that impact the Chef Desktop offering Type: Bug Does not work as expected.

Comments

@epilatow
Copy link

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.

@epilatow epilatow added the Type: Bug Does not work as expected. label Jan 28, 2021
@tas50 tas50 added the Focus: Desktop Issues that impact the Chef Desktop offering label Aug 3, 2021
@ChefAustin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus: Desktop Issues that impact the Chef Desktop offering Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

3 participants