Bug 1171582
Summary: | guest will disappear after set agent or smart card controller with a negative number after restart libvirtd | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, honzhang, lcheng, mprivozn, mzhan, rbalakri |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:57:34 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Luyao Huang
2014-12-08 06:56:05 UTC
I've just pushed the patch upstream: commit a23fefdf461c98c98e32e61440df96cf5dd43a51 Author: Luyao Huang <lhuang> AuthorDate: Mon Dec 8 16:27:26 2014 +0800 Commit: Michal Privoznik <mprivozn> CommitDate: Tue Dec 9 11:35:27 2014 +0100 conf: forbid negative number in address(like controller, bus, slot...) https://bugzilla.redhat.com/show_bug.cgi?id=1171582 When we edit a negative controller address number to a device, some of them will auto generate a controller with invalid index number. This will make guest disappear after restart libvirtd. Instead of allowing negative number for controller index, we should forbid negative number in these place (we did this before, but after f18c02ec, virStrToLong_ui changed to allow negative number). Therefore switch to virStrToLong_uip in these places. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Michal Privoznik <mprivozn> v1.2.11-rc1-4-ga23fefd Verified as below: [root@localhost ~]# rpm -q libvirt libvirt-1.2.15-1.el7.x86_64 Modified the controller value to "-1" <smartcard mode='passthrough' type='spicevmc'> <address type='ccid' controller='-1' slot='0'/> </smartcard> [root@localhost ~]# virsh edit r71 --skip-validate error: internal error: Cannot parse <address> 'controller' attribute Failed. Try again? [y,n,i,f,?]: [root@localhost ~]# virsh edit r71 error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element devices in interleave Element domain failed to validate content Failed. Try again? [y,n,i,f,?]: error: internal error: Cannot parse <address> 'controller' attribute Failed. Try again? [y,n,f,?]: [root@localhost ~]# service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service [root@localhost ~]# virsh list --all Id Name State ---------------------------------------------------- - r71 shut off [root@localhost ~]# virsh dumpxml r71 | grep "</smartcard>" -B2 <smartcard mode='passthrough' type='spicevmc'> <address type='ccid' controller='0' slot='0'/> </smartcard> Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |