← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1579664] [NEW] Nova-compute raise exception when vcpu_pin_set is set to None or"".

 

Public bug reported:

Description
===========
In Mitaka, Nova-compute raise exception when vcpu_pin_set is set to None or"".And nova-compute fails to start.

Steps to reproduce
==================
Edit vcpu_pin_set=None or vcpu_pin_set=""
then restart nova-compute service

Expected result
===============
Get_vcpu_total returns total_pcpus, and nova-compute service starts successfully.

Actual result
=============
When set vcpu_pin_set to None, raise following exception and nova-compute service fails to start:
2016-05-09 16:38:51.517 18221 ERROR nova.openstack.common.threadgroup [req-e17708cc-1c77-47cc-9182-2ed072a638a4 - - - - -] Invalid inclusion expression 'None'
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 145, in wait
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     x.wait()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return self.thread.wait()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return self._exit_event.wait()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return hubs.get_hub().switch()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return self.greenlet.switch()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     result = function(*args, **kwargs)
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 502, in run_service
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     service.start()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/service.py", line 201, in start
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     self.manager.pre_start_hook()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1575, in pre_start_hook
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     self.update_available_resource(nova.context.get_admin_context())
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7489, in update_available_resource
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     rt.update_available_resource(context)
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 521, in update_available_resource
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     resources = self.driver.get_available_resource(self.nodename)
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5518, in get_available_resource
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     data["vcpus"] = self._get_vcpu_total()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5064, in _get_vcpu_total
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     available_ids = hardware.get_vcpu_pin_set()
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/hardware.py", line 62, in get_vcpu_pin_set
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     cpuset_ids = parse_cpu_spec(CONF.vcpu_pin_set)
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/hardware.py", line 117, in parse_cpu_spec
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     "expression %r") % rule)
2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup Invalid: Invalid inclusion expression 'None'


When set vcpu_pin_set to "", raise following exception and nova-compute service fails to start:
2016-05-09 16:19:47.915 22146 ERROR nova.openstack.common.threadgroup [req-f02e4e70-dfd5-4f26-ae8b-519bd8464adc - - - - -] 'NoneType' object is not iterable
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 145, in wait
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     x.wait()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return self.thread.wait()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return self._exit_event.wait()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return hubs.get_hub().switch()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return self.greenlet.switch()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     result = function(*args, **kwargs)
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 502, in run_service
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     service.start()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/service.py", line 201, in start
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     self.manager.pre_start_hook()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1575, in pre_start_hook
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     self.update_available_resource(nova.context.get_admin_context())
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7489, in update_available_resource
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     rt.update_available_resource(context)
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 521, in update_available_resource
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     resources = self.driver.get_available_resource(self.nodename)
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5518, in get_available_resource
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     data["vcpus"] = self._get_vcpu_total()
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5066, in _get_vcpu_total
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     if sorted(available_ids)[-1] >= total_pcpus:
2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup TypeError: 'NoneType' object is not iterable

Environment
===========
Mitaka version and KVM driver

** 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/1579664

Title:
  Nova-compute raise exception when vcpu_pin_set is set to None or"".

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  In Mitaka, Nova-compute raise exception when vcpu_pin_set is set to None or"".And nova-compute fails to start.

  Steps to reproduce
  ==================
  Edit vcpu_pin_set=None or vcpu_pin_set=""
  then restart nova-compute service

  Expected result
  ===============
  Get_vcpu_total returns total_pcpus, and nova-compute service starts successfully.

  Actual result
  =============
  When set vcpu_pin_set to None, raise following exception and nova-compute service fails to start:
  2016-05-09 16:38:51.517 18221 ERROR nova.openstack.common.threadgroup [req-e17708cc-1c77-47cc-9182-2ed072a638a4 - - - - -] Invalid inclusion expression 'None'
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 145, in wait
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     x.wait()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return self.thread.wait()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return self._exit_event.wait()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return hubs.get_hub().switch()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     return self.greenlet.switch()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     result = function(*args, **kwargs)
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 502, in run_service
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     service.start()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/service.py", line 201, in start
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     self.manager.pre_start_hook()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1575, in pre_start_hook
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     self.update_available_resource(nova.context.get_admin_context())
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7489, in update_available_resource
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     rt.update_available_resource(context)
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 521, in update_available_resource
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     resources = self.driver.get_available_resource(self.nodename)
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5518, in get_available_resource
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     data["vcpus"] = self._get_vcpu_total()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5064, in _get_vcpu_total
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     available_ids = hardware.get_vcpu_pin_set()
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/hardware.py", line 62, in get_vcpu_pin_set
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     cpuset_ids = parse_cpu_spec(CONF.vcpu_pin_set)
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/hardware.py", line 117, in parse_cpu_spec
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup     "expression %r") % rule)
  2016-05-09 16:38:51.517 18221 TRACE nova.openstack.common.threadgroup Invalid: Invalid inclusion expression 'None'


  
  When set vcpu_pin_set to "", raise following exception and nova-compute service fails to start:
  2016-05-09 16:19:47.915 22146 ERROR nova.openstack.common.threadgroup [req-f02e4e70-dfd5-4f26-ae8b-519bd8464adc - - - - -] 'NoneType' object is not iterable
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 145, in wait
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     x.wait()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return self.thread.wait()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return self._exit_event.wait()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return hubs.get_hub().switch()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     return self.greenlet.switch()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     result = function(*args, **kwargs)
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 502, in run_service
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     service.start()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/service.py", line 201, in start
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     self.manager.pre_start_hook()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1575, in pre_start_hook
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     self.update_available_resource(nova.context.get_admin_context())
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7489, in update_available_resource
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     rt.update_available_resource(context)
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 521, in update_available_resource
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     resources = self.driver.get_available_resource(self.nodename)
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5518, in get_available_resource
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     data["vcpus"] = self._get_vcpu_total()
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5066, in _get_vcpu_total
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup     if sorted(available_ids)[-1] >= total_pcpus:
  2016-05-09 16:19:47.915 22146 TRACE nova.openstack.common.threadgroup TypeError: 'NoneType' object is not iterable

  Environment
  ===========
  Mitaka version and KVM driver

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


Follow ups