← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1465927] Re: varible'version' is undefine in function'_has_cpu_policy_support'

 

** Also affects: nova/kilo
   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/1465927

Title:
  varible'version' is undefine in function'_has_cpu_policy_support'

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) kilo series:
  New

Bug description:
  My running environment is
  openstack-nova-compute-2015.1.0-3.el7.noarch
  python-nova-2015.1.0-3.el7.noarch
  openstack-nova-novncproxy-2015.1.0-3.el7.noarch
  openstack-nova-conductor-2015.1.0-3.el7.noarch
  openstack-nova-api-2015.1.0-3.el7.noarch
  openstack-nova-console-2015.1.0-3.el7.noarch
  openstack-nova-scheduler-2015.1.0-3.el7.noarch
  openstack-nova-serialproxy-2015.1.0-3.el7.noarch
  openstack-nova-common-2015.1.0-3.el7.noarch

  When boot a instance to a host with llibvirt version 1.2.10  and flavor key set with hw:cpu_policy=dedicated,
  there  is log with below:

  File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py",
  line 3404, in _has_cpu_policy_support

  File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py",
  line 524, in _version_to_string

  TypeError: 'module'  object is not iterable  in
  nova/virt/libvirt/driver.py

  Souce Code of K verison is below:

   def _has_cpu_policy_support(self):
          for ver in BAD_LIBVIRT_CPU_POLICY_VERSIONS:
              if self._host.has_version(ver):
                  ver_ = self._version_to_string(version)
                  raise exception.CPUPinningNotSupported(reason=_(
                      'Invalid libvirt version %(version)s') % {'version': ver_})
          return True

  I thought this func is mistake in writing with

  ver_ = self._version_to_string(version)

  So when libvirt version is BAD_LIBVIRT_CPU_POLICY_VERSIONS there will
  be a TypeError

  It should be ver_ = self._version_to_string(ver)

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


References