← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1370229] [NEW] Total VCPUs could change on PowerKVM host, but change not reflected in host stats

 

Public bug reported:

PowerKVM hosts support the feature of split cores. If a user enables 4
subcores per core on a system with 16 CPUS, then total VCPUs reported by
virsh and libvirt's getInfo() API changes from 16 to 64.

However, the hypervisor details API still shows 16 for VCPUs.

This is because the total VCPUs of a host are only collected once; the
first time libvirt driver obtains all the host stats, and that value is
saved off and used from that point on every time the host stats are
calculated.


In nova.virt.libvirt.driver.LibvirtDriver:

    def _get_vcpu_total(self):
        """Get available vcpu number of physical computer.

        :returns: the number of cpu core instances can be used.

        """
        if self._vcpu_total != 0:
            return self._vcpu_total

        try:
            total_pcpus = self._conn.getInfo()[2]
....

This should be changed to always fetch the total VCPUs, instead of
relying on it never changing.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1370229

Title:
  Total VCPUs could change on PowerKVM host, but change not reflected in
  host stats

Status in OpenStack Compute (Nova):
  New

Bug description:
  PowerKVM hosts support the feature of split cores. If a user enables 4
  subcores per core on a system with 16 CPUS, then total VCPUs reported
  by virsh and libvirt's getInfo() API changes from 16 to 64.

  However, the hypervisor details API still shows 16 for VCPUs.

  This is because the total VCPUs of a host are only collected once; the
  first time libvirt driver obtains all the host stats, and that value
  is saved off and used from that point on every time the host stats are
  calculated.

  
  In nova.virt.libvirt.driver.LibvirtDriver:

      def _get_vcpu_total(self):
          """Get available vcpu number of physical computer.

          :returns: the number of cpu core instances can be used.

          """
          if self._vcpu_total != 0:
              return self._vcpu_total

          try:
              total_pcpus = self._conn.getInfo()[2]
  ....

  This should be changed to always fetch the total VCPUs, instead of
  relying on it never changing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1370229/+subscriptions


Follow ups

References