salopensource / sal-scripts

Apache License 2.0
23 stars 31 forks source link

Ohai attributes are retrieved from stdout, which may include non-json output #44

Closed 1dustindavis closed 5 years ago

1dustindavis commented 5 years ago

Currently, Ohai attributes are retrieved directly from stdout. Depending on the configuration of Ohai, this may result in unrelated Ohai warnings being included when Sal attempts to parse the json.

For example, if the Ohai configuration includes ohai.log_location STDOUT Ohai's output may include something like [2019-03-22T10:56:06-07:00] WARN: Plugin Network: [inet] no ip address on utun4. When Sal attempts to parse this, it will throw an exception on the - character, which causes all of the Ohai data to be skipped.

Potentially, Sal could override the log level by passing something like -l fatal, but it might be best to leave this decision up to the admin and include a note in the wiki.

sheagcraig commented 5 years ago

This is no longer an issue... Because sal-scripts aren't parsing Ohai anything ;)

An Ohai/Chef checkin_module will need to be written for use with Sal v4. Details in the wiki, and contact me if you need help.