Public bug reported:

https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L674-L718

In _get_host_states, a list of all computes nodes is retrieved with a
`state_key` of `(host, node)`.

https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L692
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L708

The small piece of code here removes all of the dead compute nodes from
host_state_map

https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L708

However, the result is returned by iterating over all seen nodes and
using that index for host_state_map, some of which have been deleted by
the code above, resulting in a KeyError.

https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L718

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: scheduler

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

Title:
  KeyError in host_manager for _get_host_states

Status in OpenStack Compute (nova):
  New

Bug description:
  
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L674-L718

  In _get_host_states, a list of all computes nodes is retrieved with a
  `state_key` of `(host, node)`.

  
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L692
  
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L708

  The small piece of code here removes all of the dead compute nodes
  from host_state_map

  
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L708

  However, the result is returned by iterating over all seen nodes and
  using that index for host_state_map, some of which have been deleted
  by the code above, resulting in a KeyError.

  
https://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L718

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to