Bug 727841

Summary: Invalid JSON syntax when spice password is set
Product: Red Hat Enterprise Linux 6 Reporter: Marian Krcmarik <mkrcmari>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2CC: berrange, eblake
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-03 12:12:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix null parameter none

Description Marian Krcmarik 2011-08-03 11:44:40 UTC
Description of problem:
I am getting an error when spice password is set in domain:
error: Failed to start domain WinXP
error: internal error unable to execute QEMU command '__com.redhat_set_password': Invalid JSON syntax - which means that It's no possible to start Domain.
I believe This is fixed in repo already (based on discussion with Michal (mprivozn), anyway creating a bug for tracking that and making sure It will be retested and included in test cases.

Version-Release number of selected component (if applicable):
libvirt-0.9.4-0rc2.el6

How reproducible:
Always

Steps to Reproduce:
1. Start a Domain using virsh with spice password set (attribute passwd in graphics element)
  
Actual results:
error: internal error unable to execute QEMU command '__com.redhat_set_password': Invalid JSON syntax

Expected results:
Started Domain

Additional info:

Comment 1 Daniel Berrangé 2011-08-03 11:57:17 UTC
Please provide the /var/log/libvirt/libvirtd.log file for the host, so that we can see the JSON data sent to QEMU

Comment 2 Marian Krcmarik 2011-08-03 12:00:03 UTC
libvirtd.log

13:50:45.887: 31759: debug : virJSONValueToString:1102 : result={"error":{"class":"JSONParsing","desc":"Invalid JSON syntax","data":{}}}
13:50:45.887: 31759: debug : qemuMonitorJSONCheckError:306 : unable to execute QEMU command {"execute":"__com.redhat_set_password","arguments":{"protocol":"spice","password":"12345","connected":null,"expiration":195},"id":"libvirt-5"}: {"error":{"class":"JSONParsing","desc":"Invalid JSON syntax","data":{}}}
13:50:45.887: 31759: error : qemuMonitorJSONCheckError:317 : internal error unable to execute QEMU command '__com.redhat_set_password': Invalid JSON syntax
13:50:45.887: 31759: debug : qemuProcessStop:3082 : Shutting down VM 'WinXP' pid=31897 migrated=0

Comment 3 Daniel Berrangé 2011-08-03 12:11:39 UTC
This shows the flaw:

> {"execute":"__com.redhat_set_password","arguments" {"protocol":"spice","password":"12345","connected":null,"expiration":195},"id":"libvirt-5"}:

the 'connected' attribute is 'null' which is not a valid string. THis is introduced by the custom patch

libvirt-Support-password-expiry-and-connected-in-the-QEMU-driver.patch

which was not rebased correctly for libvirt 0.9.4

Comment 4 Eric Blake 2011-08-03 12:12:04 UTC
Known issue; see bug 707212 comment 14

Comment 5 Eric Blake 2011-08-03 12:12:30 UTC

*** This bug has been marked as a duplicate of bug 707212 ***

Comment 6 Daniel Berrangé 2011-08-03 12:13:46 UTC
Created attachment 516503 [details]
Fix null parameter

Comment 7 Marian Krcmarik 2011-08-03 12:36:45 UTC
(In reply to comment #4)
> Known issue; see bug 707212 comment 14

Good, In that case this build should not pass QE consumption and should be mentioned in Acceptance testing results.
Libvirt QE, please make sure for next time.
As well as it's regression between libvirt-0.9.4-0rc1.2 and libvirt-0.9.4-0rc2.
This bug report was to make sure It will really get in next realese.
Thanks.