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 1251962 - kvm-setup.service should include Before=libvirtd.service
Summary: kvm-setup.service should include Before=libvirtd.service
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: ppc64le
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Laurent Vivier
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-10 12:13 UTC by Andrea Bolognani
Modified: 2015-12-04 16:53 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-rhev-2.3.0-18.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-04 16:53:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2546 0 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2015-12-04 21:11:56 UTC

Description Andrea Bolognani 2015-08-10 12:13:00 UTC
Description of problem:

  libvirtd reads some information about the system at startup only;
  this include the CPU topology.

  If the configuration is changed after that moment, the information
  reported will be incomplete or inaccurate.


Version-Release number of selected component (if applicable):

  qemu-kvm-rhev-2.3.0-16.el7.ppc64le


How reproducible:

  Always.


Steps to Reproduce:

  1. Boot the system
  2. Run 'virsh capabilities' as root


Actual results:

  The output contains partial information for the secondary threads, eg.

    <cpus num='40'>
      <cpu id='80' socket_id='16' core_id='2088' siblings='80'/>
      <cpu id='81'/>
      <cpu id='82'/>
      <cpu id='83'/>
      <cpu id='84'/>
      <cpu id='85'/>
      <cpu id='86'/>
      <cpu id='87'/>
      <cpu id='88' socket_id='16' core_id='2096' siblings='88'/>
      <cpu id='89'/>
      <cpu id='90'/>
      <cpu id='91'/>
      <cpu id='92'/>
      <cpu id='93'/>
      <cpu id='94'/>
      <cpu id='95'/>
      <cpu id='96' socket_id='16' core_id='2144' siblings='96'/>
      <cpu id='97'/>
      <cpu id='98'/>
      <cpu id='99'/>
      <cpu id='100'/>
      <cpu id='101'/>
      <cpu id='102'/>
      <cpu id='103'/>
      <cpu id='104' socket_id='16' core_id='2152' siblings='104'/>
      <cpu id='105'/>
      <cpu id='106'/>
      <cpu id='107'/>
      <cpu id='108'/>
      <cpu id='109'/>
      <cpu id='110'/>
      <cpu id='111'/>
      <cpu id='112' socket_id='16' core_id='2160' siblings='112'/>
      <cpu id='113'/>
      <cpu id='114'/>
      <cpu id='115'/>
      <cpu id='116'/>
      <cpu id='117'/>
      <cpu id='118'/>
      <cpu id='119'/>
    </cpus>


Expected results:

  The output only contains information about the primary threads, eg.

    <cpus num='5'>
      <cpu id='80' socket_id='16' core_id='2088' siblings='80'/>
      <cpu id='88' socket_id='16' core_id='2096' siblings='88'/>
      <cpu id='96' socket_id='16' core_id='2144' siblings='96'/>
      <cpu id='104' socket_id='16' core_id='2152' siblings='104'/>
      <cpu id='112' socket_id='16' core_id='2160' siblings='112'/>
    </cpus>


Additional info:

  I have added the required information as an override:

    $ sudo systemctl cat kvm-setup.service
    # /usr/lib/systemd/system/kvm-setup.service
    [Unit]
    Description=Perform system configuration to prepare system to run KVM guests
    # Offlining CPUs can cause irqbalance to throw warnings if it's running
    Before=irqbalance.service

    [Service]
    Type=oneshot
    EnvironmentFile=-/etc/sysconfig/kvm
    ExecStart=/usr/lib/systemd/kvm-setup
    [Install]
    WantedBy=multi-user.target

    # /etc/systemd/system/kvm-setup.service.d/override.conf
    [Unit]
    Before=libvirtd.service

  and this change is enough to fix the issue.

  The additional Before= entry should be added to kvm-setup.service so
  that the sysadmin won't have to perform these steps manually.

Comment 2 Miroslav Rezanina 2015-08-14 16:22:40 UTC
Fix included in qemu-kvm-rhev-2.3.0-18.el7

Comment 4 Shuang Yu 2015-08-25 02:53:10 UTC
Reproduce this issue with "qemu-kvm-rhev-2.3.0-16.el7.ppc64le"

Steps:

1.Boot the system

2.[root@ibm-p8-rhevm-11 ~]# virsh capabilities

3.[root@ibm-p8-rhevm-11 ~]#systemctl cat kvm-setup.service

Actual result:

After step2:
[root@ibm-p8-rhevm-11 ~]# virsh capabilities

<cpus num='40'>
            <cpu id='120' socket_id='17' core_id='2208' siblings='120'/>
            <cpu id='121'/>
            <cpu id='122'/>
            <cpu id='123'/>
            <cpu id='124'/>
            <cpu id='125'/>
            <cpu id='126'/>
            <cpu id='127'/>
            <cpu id='128' socket_id='17' core_id='2216' siblings='128'/>
            <cpu id='129'/>
            <cpu id='130'/>
            <cpu id='131'/>
            <cpu id='132'/>
            <cpu id='133'/>
            <cpu id='134'/>
            <cpu id='135'/>
            <cpu id='136' socket_id='17' core_id='2224' siblings='136'/>
            <cpu id='137'/>
            <cpu id='138'/>
            <cpu id='139'/>
            <cpu id='140'/>
            <cpu id='141'/>
            <cpu id='142'/>
            <cpu id='143'/>
            <cpu id='144' socket_id='17' core_id='2272' siblings='144'/>
            <cpu id='145'/>
            <cpu id='146'/>
            <cpu id='147'/>
            <cpu id='148'/>
            <cpu id='149'/>
            <cpu id='150'/>
            <cpu id='151'/>
            <cpu id='152' socket_id='17' core_id='2288' siblings='152'/>
            <cpu id='153'/>
            <cpu id='154'/>
            <cpu id='155'/>
            <cpu id='156'/>
            <cpu id='157'/>
            <cpu id='158'/>
            <cpu id='159'/>
          </cpus>

After step3:
[root@ibm-p8-rhevm-11 ~]#systemctl cat kvm-setup.service
# /usr/lib/systemd/system/kvm-setup.service
[Unit]
Description=Perform system configuration to prepare system to run KVM guests
# Offlining CPUs can cause irqbalance to throw warnings if it's running
Before=irqbalance.service

[Service]
Type=oneshot
EnvironmentFile=-/etc/sysconfig/kvm
ExecStart=/usr/lib/systemd/kvm-setup

[Install]
WantedBy=multi-user.target

Comment 5 Shuang Yu 2015-08-25 02:55:26 UTC
Verify this bug with "qemu-kvm-rhev-2.3.0-18.el7.ppc64le"

Steps:

1.Boot the system

2.[root@ibm-p8-rhevm-11 ~]# virsh capabilities

3.[root@ibm-p8-rhevm-11 ~]#systemctl cat kvm-setup.service

Actual result:

After step2:
[root@ibm-p8-rhevm-11 ~]# virsh capabilities
<cpus num='5'>
            <cpu id='80' socket_id='16' core_id='2080' siblings='80'/>
            <cpu id='88' socket_id='16' core_id='2096' siblings='88'/>
            <cpu id='96' socket_id='16' core_id='2144' siblings='96'/>
            <cpu id='104' socket_id='16' core_id='2152' siblings='104'/>
            <cpu id='112' socket_id='16' core_id='2160' siblings='112'/>
          </cpus>

After step3:
[root@ibm-p8-rhevm-11 ~]#systemctl cat kvm-setup.service
# /usr/lib/systemd/system/kvm-setup.service
[Unit]
Description=Perform system configuration to prepare system to run KVM guests
# Offlining CPUs can cause irqbalance to throw warnings if it's running
Before=irqbalance.service
# libvirtd reads CPU topology at startup, so change it before
Before=libvirtd.service

[Service]
Type=oneshot
EnvironmentFile=-/etc/sysconfig/kvm
ExecStart=/usr/lib/systemd/kvm-setup

[Install]
WantedBy=multi-user.target

Comment 6 Qunfang Zhang 2015-08-25 08:12:29 UTC
Setting to VERIFIED according to comment 4 and comment 5.

Comment 8 errata-xmlrpc 2015-12-04 16:53:46 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.

https://rhn.redhat.com/errata/RHBA-2015-2546.html


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