Bug 677308 - missing > in the xml generated by libvirt for smartcard
Summary: missing > in the xml generated by libvirt for smartcard
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 641834
TreeView+ depends on / blocked
 
Reported: 2011-02-14 10:31 UTC by Vivian Bian
Modified: 2011-11-22 06:45 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.8.7-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:27:19 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description Vivian Bian 2011-02-14 10:31:56 UTC
Description of problem:
paste the following section into guest.xml for smartcard support , will always get following error , and following xml translation result :

[what is pasted]

    <smartcard mode='host'/>
    <smartcard mode='host-certificates'>
      <certificate>cert1</certificate>
      <certificate>cert2</certificate>
      <certificate>cert3</certificate>
      <database>/etc/pki/nssdb/</database>
    </smartcard>
    <smartcard mode='passthrough' type='tcp'>
      <source mode='bind' host='127.0.0.1' service='2001'/>
      <protocol type='raw'/>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>
    <smartcard mode='passthrough' type='spicevmc'/>

[what is generated by libvirt]

line 46 : 
<smartcard mode='host'      <address type='ccid' controller='0' slot='1'/>

[error output]
error: Failed to start domain windows
error: at line 46: error parsing attribute name


Version-Release number of selected component (if applicable):
libvirt-0.8.7-6.el6.x86_64

How reproducible:
always


  
Actual results:


Expected results:


Additional info:
since on Bug 641834 - RFE: Spice / smartcard support , we need to paste the above xml into guest.xml . And now , we meet this bug , so can't verify 641834 bug . Set this bug to TEST BLOCKER

Comment 3 Jiri Denemark 2011-02-14 11:49:50 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2011-February/msg00426.html

Comment 4 Jiri Denemark 2011-02-14 20:19:55 UTC
Patch sent to rhvirt-patches

Comment 7 Vivian Bian 2011-02-18 09:24:04 UTC
verified with libvirt-0.8.7-7.el6.x86_64

pasted

    <smartcard mode='host'/>


got
    <smartcard mode='host'>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>



pasted 

    <smartcard mode='host-certificates'>
      <certificate>cert1</certificate>
      <certificate>cert2</certificate>
      <certificate>cert3</certificate>
      <database>/etc/pki/nssdb/</database>
    </smartcard>

got 
    <smartcard mode='host-certificates'>
    </smartcard>


pasted
    <smartcard mode='passthrough' type='tcp'>
      <source mode='bind' host='127.0.0.1' service='2001'/>
      <protocol type='raw'/>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>

got
    <smartcard mode='passthrough' type='tcp'>
      <alias name='smartcard0'/>
    </smartcard>


pasted 
    <smartcard mode='passthrough' type='spicevmc'/>

got 
    <smartcard mode='passthrough' type='spicevmc'>
      <alias name='smartcard0'/>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>



no ">" missed after parsing . So set bug status to VERIFIED

Comment 8 Vivian Bian 2011-04-18 07:19:15 UTC
tested with 
libvirt-0.8.7-17.el6.x86_64
qemu-kvm-0.12.1.2-2.158.el6.x86_64
kernel-2.6.32-131.0.1.el6.x86_64

we won't get > missed in the xml generated . So keep the VERIFIED status

Comment 11 errata-xmlrpc 2011-05-19 13:27:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html


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