There are a couple of places in the driver where we use the keys() method without checking for None.
I have seen several times the following exception:
2014-09-22 11:45:07.312 ERROR nova.openstack.common.periodic_task [-] Error during ComputeManager.update_available_resource: 'NoneType' object has no attribute 'keys'
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task Traceback (most recent call last):
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task File "/opt/stack/nova/nova/openstack/common/periodic_task.py", line 198, in run_periodic_tasks
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task task(self, context)
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task File "/opt/stack/nova/nova/compute/manager.py", line 5909, in update_available_resource
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task nodenames = set(self.driver.get_available_nodes())
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 426, in get_available_nodes
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task self._update_resources()
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 306, in _update_resources
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task added_nodes = set(self.dict_mors.keys()) - set(self._resource_keys)
2014-09-22 11:45:07.312 TRACE nova.openstack.common.periodic_task AttributeError: 'NoneType' object has no attribute 'keys'
Fix proposed to branch: master /review. openstack. org/123287
Review: https:/