Bug 727841 - Invalid JSON syntax when spice password is set
Summary: Invalid JSON syntax when spice password is set
Status: CLOSED DUPLICATE of bug 707212
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-03 11:44 UTC by Marian Krcmarik
Modified: 2011-08-03 12:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-08-03 12:12:30 UTC

Attachments (Terms of Use)
Fix null parameter (594 bytes, patch)
2011-08-03 12:13 UTC, Daniel Berrangé
no flags Details | Diff

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):

How reproducible:

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

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


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.

Note You need to log in before you can comment on or make changes to this bug.