On Thu, Dec 06, 2012 at 07:29:12AM -0500, Laine Stump wrote:
On 12/06/2012 06:34 AM, Michal Privoznik wrote:
> If the debugging is enabled, the virCommand subsystem catches debug
> messages in the command output as well. In that case, we can't assume
> the string corresponding to command's stdout will start with specific
> prefix. But the prefix can be moved deeper in the string. This bug
> shows itself when parsing dnsmasq output:
>
> 2012-12-06 11:18:11.445+0000: 18491: error :
> dnsmasqCapsSetFromBuffer:664 : internal error cannot parse
> /usr/sbin/dnsmasq version number in '2012-12-06 11:11:02.232+0000:
> 18492: debug : virFileClose:72 : Closed fd 22'
>
> We can clearly see that the output of dnsmasq --version
> doesn't start with expected "Dnsmasq version " string but a libvirt
> debug output.
This is a bug in virCommand, and should also affect
qemuCapsParseHelpStr(). Is there no way to fix it at the source, rather
than working around it like this?
Well the debug logging messages should be going to stderr,
while the code should be parsing stdout. It sounds like
something caused the logging messages on stderr to get
mixed together with stdout. Ensuring that mix does not
happen is likely the correct fix.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|