Sanitize command output in ohai-solo system info
Bug #1294851 reported by
BK Box
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
satori |
Fix Released
|
Medium
|
BK Box |
Bug Description
Paramiko has issues with parsing stdout of a command on some fedora based distros when there is something printed to the screen and an interactive session. This causes an issue with ohai-solo and parsing the returned JSON document since the beginning of the output is not JSON.
For example, when the .bashrc file contains something like the following:
echo "G'day!"
the output of ohai-solo returned from Paramiko would be:
G'day!
{ "system_info": "some_json" }
The call `json.loads()` against that string will raise an exception.
Expected behavior:
Find the valid JSON in the string (if any), pull it out, and try to parse that.
Changed in satori: | |
status: | Fix Committed → Fix Released |
Changed in satori: | |
milestone: | none → poc |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/81626
Review: https:/