ohai_solo and posh_ohai json.loads should try harder

Bug #1409175 reported by Sam Stavinoha on 2015-01-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sam Stavinoha

Bug Description

Right now if the initial json.loads() does not work, we call get_json which looks for the first "{" and last "}" to extract the json string from the output of the server. This has been useful if the shell is spitting out unwanted characters such as fail whales or security banners.

Due to the amount of data returned from ohai_solo or posh_ohai, we are bound to see some UnicodeDecodeError or ValueError from an invalid control character.

Fixing this bug means going one or more steps further in order to do whatever is necessary to decode the data returned.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers