RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1088748 - [Doc] fail to hot-plug vcpus while guest is in booting phase
Summary: [Doc] fail to hot-plug vcpus while guest is in booting phase
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-17 06:17 UTC by Xuesong Zhang
Modified: 2016-04-26 16:09 UTC (History)
5 users (show)

Fixed In Version: libvirt-0.10.2-34.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 04:21:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1374 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2014-10-14 08:11:54 UTC

Description Xuesong Zhang 2014-04-17 06:17:29 UTC
Description of problem:
libvirt should forbid to hot-plug vcpus while guest is in booting phase

Version-Release number of selected component (if applicable):
libvirt-0.10.2-32.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.423.el6.x86_64
kernel-2.6.32-457.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. prepare one shutoff guest, edit the cpu settings like following one.
......
  <vcpu placement='static' current='2'>4</vcpu>
......

2. start the guest

3. check the vcpu info
# virsh vcpucount rhel6.5
maximum      config         4
maximum      live           4
current      config         2
current      live           2

4. while the guest is still in booting phase, hot-plug the vcpu to guest.
# virsh setvcpus  rhel6.5 3

# virsh vcpucount rhel6.5
maximum      config         4
maximum      live           4
current      config         2
current      live           3

5. after the guest finished booting up, check in the guest, the cpu didn't be hot-pluged successfully.
In guest
# cat /proc/cpuinfo|grep processor|wc -l
2




Actual results:
the vcpu number in step 4 and step 5 are different, hot-plug vcpu fail in step 4 actually, but the vcpu number in hypervisor is changed to 3.

Expected results:
in step 4, it's better let libvirt forbid hot-plug vcpus while guest is in booting phase. 

Addtional info:
From the following bug, you can see that hot-plug vcpus via qemu will be failed also while guest is in booting phase.
https://bugzilla.redhat.com/show_bug.cgi?id=807508
So, suggest to forbid hot-plug vcpu while guest is in booting phase in libvirt.

Comment 1 Xuesong Zhang 2014-04-18 09:51:24 UTC
Seems libvirt or qemu can't determine whether one guest is full booted up.
So suggest to add this know issue in the man page of virsh setvcpus command.

Comment 2 Ján Tomko 2014-04-23 12:11:37 UTC
Upstream patch:
https://www.redhat.com/archives/libvir-list/2014-April/msg00873.html

Comment 3 Ján Tomko 2014-04-23 12:39:39 UTC
Pushed upstream:
commit 22a92eb0a79f398c88bec4bb5e59804029ad7ca0
Author:     Ján Tomko <jtomko>
AuthorDate: 2014-04-23 13:01:24 +0200
Commit:     Ján Tomko <jtomko>
CommitDate: 2014-04-23 14:24:21 +0200

    Document behavior of setvcpus during guest boot
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1088748
    
    The hotplugged vcpus could fail to show up in the guest if
    they were added during boot, see:
    https://bugzilla.redhat.com/show_bug.cgi?id=807508
    
    Also change arbitrary to arbitrarily.

git describe: v1.2.3-150-g22a92eb

Downstream patch:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2014-April/msg00478.html

Comment 5 Jincheng Miao 2014-05-04 08:05:23 UTC
The explain of virsh command setvcpus can be found in latest libvirt-0.10.2-34.el6.

# man virsh
...
       setvcpus domain count [--maximum] [[--config] [--live] | [--current]]
       [--guest]
...
           If --live is specified, the guest domain must be active, and the
           change takes place immediately.  Both the --config and --live flags
           may be specified together if supported by the hypervisor.  If this
           command is run before the guest has finished booting, the guest may
           fail to process the change.
...

Comment 7 errata-xmlrpc 2014-10-14 04:21:27 UTC
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.

http://rhn.redhat.com/errata/RHBA-2014-1374.html


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