Bug 1451251
| Summary: | guest will shut down when libvirtd restart after hotplug vcpu with libvirtd restart | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jingjing Shao <jishao> |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
| Status: | CLOSED ERRATA | QA Contact: | Jingjing Shao <jishao> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | dyuan, lhuang, rbalakri, xuzhang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.2.0-9.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-02 00:08:25 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: | |||
Fixed upstream:
commit ad3c6b229bcc91177db29d307e8ccc22c6c43565
Author: Peter Krempa <pkrempa>
Date: Tue Jun 6 07:39:25 2017 +0200
qemu: process: Save vcpu ordering information on reconnect
vCPU ordering information would not be updated if a vCPU emerged or
disappeared during the time libvirtd is not running. This allowed to
create invalid configuration like:
[...]
<vcpu id='56' enabled='yes' hotpluggable='yes' order='57'/>
<vcpu id='57' enabled='yes' hotpluggable='yes' order='58'/>
<vcpu id='58' enabled='yes' hotpluggable='yes'/>
Call the function that records the information on reconnect.
Verify this bug as below
libvirt-3.2.0-9.virtcov.el7.x86_64
1. # virsh start vm1
Domain vm1 started
# virsh vcpucount vm1
maximum config 200
maximum live 200
current config 1
current live 1
2.On the first terminal
# virsh setvcpus vm1 200
On the second terminal
# service libvirtd restart
On the first terminal
virsh setvcpus vm1 200
error: Disconnected from qemu:///system due to keepalive timeout
error: internal error: connection closed due to keepalive timeout
On the second terminal
# service libvirtd restart
Redirecting to /bin/systemctl restart libvirtd.service
# virsh vcpucount vm1
maximum config 200
maximum live 200
current config 1
current live 110
3 # virsh list
Id Name State
----------------------------------------------------
24 vm1 running
# virsh dumpxml vm1 | grep vcpu -A7
<vcpu placement='static' current='59'>200</vcpu>
<vcpus>
<vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
<vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
......
<vcpu id='107' enabled='yes' hotpluggable='yes' order='108'/>
<vcpu id='108' enabled='yes' hotpluggable='yes' order='109'/>
<vcpu id='109' enabled='yes' hotpluggable='yes' order='110'/>
<vcpu id='110' enabled='no' hotpluggable='yes'/>
<vcpu id='111' enabled='no' hotpluggable='yes'/>
4. # service libvirtd restart
Redirecting to /bin/systemctl restart libvirtd.service
5 # virsh list
Id Name State
----------------------------------------------------
24 vm1 running
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://access.redhat.com/errata/RHEA-2017:1846 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://access.redhat.com/errata/RHEA-2017:1846 |
Description of problem: guest will shut down when libvirtd restart after hotplug vcpu with libvirtd restart Version-Release number of selected component (if applicable): # rpm -q libvirt libvirt-3.2.0-5.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a guest # virsh start r7.2 Domain r7.2 started # virsh vcpucount r7.2 maximum config 200 maximum live 200 current config 3 current live 3 2.On the first terminal # virsh setvcpus r7.2 200 On the second terminal # service libvirtd restart On the first terminal # virsh setvcpus r7.2 200 error: Disconnected from qemu:///system due to keepalive timeout error: internal error: connection closed due to keepalive timeout On the second terminal # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh vcpucount r7.2 maximum config 200 maximum live 200 current config 3 current live 59 3.# virsh list --all Id Name State ---------------------------------------------------- 1 r7.2 running # virsh dumpxml r7.2 | grep vcpu -A7 <vcpu placement='static' current='59'>200</vcpu> <vcpus> <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/> <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/> ...... <vcpu id='56' enabled='yes' hotpluggable='yes' order='57'/> <vcpu id='57' enabled='yes' hotpluggable='yes' order='58'/> <vcpu id='58' enabled='yes' hotpluggable='yes'/> <vcpu id='59' enabled='no' hotpluggable='yes'/> <vcpu id='60' enabled='no' hotpluggable='yes'/> 4. # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh list --all Id Name State ---------------------------------------------------- - r7.2 shut off # ps -ef | grep qemu qemu 13861 1 10 16:25 ? 00:00:43 /usr/libexec/qemu-kvm -name guest=r7.2,,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-r7.2/master-key.aes -machine pc-i440fx-rhel7.4.0,accel=kvm,usb=off,dump-guest-core=off -m 1024 -realtime mlock=off -smp 1 ........ Check the libvirtd.log .... 2017-05-16 08:31:46.015+0000: 14165: debug : virQEMUCapsCacheLookup:5341 : Returning caps 0x7f60dc334d80 for /usr/libexec/qemu-kvm 2017-05-16 08:31:46.015+0000: 14165: error : qemuDomainDefVcpusPostParse:2654 : unsupported configuration: all vcpus must have either set or unset order .... Actual results: guest shutdown after libvirtd restart Expected results: guest should be running Additional info: N/A