← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1153694] Re: Counting vcpus can fail when domains are not complete

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => grizzly-rc1

-- 
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/1153694

Title:
  Counting vcpus can fail when domains are not complete

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  Libvirt allows the virDomainGetVcpus() function to fail in case the
  instance is not ready. This can cause random failures during instance
  startup or shutdown.

  Traceback returned in that case is:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 779, in _run_instance
      requested_networks, macs, security_groups)
    File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1002, in _allocate_network
      expected_task_state=None)
    File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 374, in _instance_update
      instance_ref['node'] in self.driver.get_available_nodes()):
    File "/usr/lib/python2.7/dist-packages/nova/virt/driver.py", line 843, in get_available_nodes
      stats = self.get_host_stats(refresh=True)
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3367, in get_host_stats
      return self.host_state.get_host_stats(refresh=refresh)
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3662, in get_host_stats
      self.update_status()
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3670, in update_status
      data["vcpus_used"] = self.driver.get_vcpu_used()
    File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2556, in get_vcpu_used
      total += len(vcpus[1])
  TypeError: 'NoneType' object has no attribute '__getitem__'

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