diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-11 16:43:32 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-11 16:43:32 +0000 |
commit | 6974d651ccbbf91ec5850af1c7c66cea627744d3 (patch) | |
tree | 80a168bd416757ad41580e4a078a4d73f6993103 /nova/scheduler/host_manager.py | |
parent | 035c1177ded9fa8a40ad40950e5971b3cd707eaf (diff) | |
parent | 36a0ba9c8141b445f2c6bfc093fde4cc98d229b2 (diff) | |
download | nova-6974d651ccbbf91ec5850af1c7c66cea627744d3.tar.gz |
Merge "Avoid update resource if compute node not updated"
Diffstat (limited to 'nova/scheduler/host_manager.py')
-rw-r--r-- | nova/scheduler/host_manager.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index 0d79b9001f..a4573aef4b 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -181,6 +181,11 @@ class HostState(object): def _update_from_compute_node(self, compute): """Update information about a host from a ComputeNode object.""" + # NOTE(jichenjc): if the compute record is just created but not updated + # some field such as free_disk_gb can be None + if compute.updated_at is None: + return + if (self.updated and compute.updated_at and self.updated > compute.updated_at): return |