Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1170484 - guest can not start when setting " vcpu placement='auto' "
guest can not start when setting " vcpu placement='auto' "
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.1
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
: Upstream
Depends On:
Blocks: 1170492 1170495 1175709
  Show dependency treegraph
 
Reported: 2014-12-04 00:51 EST by Song Wang
Modified: 2015-03-05 02:47 EST (History)
8 users (show)

See Also:
Fixed In Version: libvirt-1.2.8-11.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 02:47:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Libvirtd log (389.48 KB, text/plain)
2014-12-04 00:53 EST, Song Wang
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description Song Wang 2014-12-04 00:51:49 EST
Description of problem:
guest can not start when setting "  vcpu placement='auto'  "

Version-Release number of selected component (if applicable):
libvirt-1.2.8-10.el7.x86_64
qemu-kvm-rhev-2.1.2-14.el7.x86_64
kernel-3.10.0-201.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.[root@localhost songwang]# virsh edit aa
Domain aa XML configuration edited.

2.[root@localhost songwang]# virsh dumpxml aa |grep cpu -A4
  <vcpu placement='auto' current='2'>4</vcpu>
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>
  <os>
 

3.[root@localhost songwang]# virsh start aa
error: Failed to start domain aa
error: Failed to create controller cpu for group: No such file or directory

4.
[root@localhost songwang]# virsh dumpxml aa |grep cpu
  <vcpu placement='static' current='2'>4</vcpu>

5.[root@localhost songwang]# virsh start aa
Domain aa started


Actual results:
As steps

Expected results:
It should start guest successfully.

Additional info:
when I downgrade libvirt to libvirt-1.2.8-9.el7.x86_64 ,I can start guest successfully.
[root@localhost Downloads]# rpm -q libvirt
libvirt-1.2.8-9.el7.x86_64
[root@localhost Downloads]# virsh edit aa
Domain aa XML configuration edited.

[root@localhost Downloads]# virsh dumpxml aa |grep cpu -A4
  <vcpu placement='auto' current='2'>4</vcpu>
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>
  <os>

[root@localhost Downloads]# virsh start aa
Domain aa started
Comment 1 Song Wang 2014-12-04 00:53:04 EST
Created attachment 964446 [details]
Libvirtd log
Comment 3 Luyao Huang 2014-12-04 02:07:47 EST
I think this is Because bug 1168866 forget this patch

commit 411cea638f6ec8503b7142a31e58b1cd85dbeaba
Author: Zhou yimin <zhouyimin@huawei.com>
Date:   Thu Oct 16 22:18:48 2014 +0800

    qemu: move setting emulatorpin ahead of monitor showing up
    
    If VM is configured with many devices(including passthrough devices)
    and large memory, libvirtd will take seconds(in the worst case) to
    wait for monitor. In this period the qemu process may run on any
    PCPU though I intend to pin emulator to the specified PCPU in xml
    configuration.
    
    Actually qemu process takes high cpu usage during vm startup.
    So this is not the strict CPU isolation in this case.
    
    Signed-off-by: Zhou yimin <zhouyimin@huawei.com>

And because qemuSetupCgroupForEmulator haven't been called before
qemuSetupCpusetMems in qemuSetupCgroupPostInit, then call virCgroupNewEmulator(priv->cgroup, false, &cgroup_temp)
in qemuSetupCpusetMems. 
Because create is false in this place(virCgroupNewEmulator) and haven't call
qemuSetupCgroupForEmulator to create a dir before, so this will get
fail in virCgroupMakeGroup this line:

if (!virFileExists(path)) {
    if (!create ||
        mkdir(path, 0755) < 0) {
Comment 8 Jincheng Miao 2014-12-23 00:03:38 EST
This problem is fixed in libvirt-1.2.8-11.el7.x86_64:
# rpm -q libvirt
libvirt-1.2.8-11.el7.x86_64

1. configure a guest as automatic vcpu placement
# virsh edit a
...
  <vcpu placement='auto'>4</vcpu>
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>
...


2. succeed to start guest
# virsh start a
Domain a started

So I change the status to VERIFIED.
Comment 10 errata-xmlrpc 2015-03-05 02:47:55 EST
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/RHSA-2015-0323.html

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