summaryrefslogtreecommitdiffstats
path: root/nova/scheduler
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2013-01-07 15:12:39 +1300
committerRobert Collins <robertc@robertcollins.net>2013-01-07 15:12:39 +1300
commitfad69df25ffcea2a44cbf3ef636a68863a2d64d9 (patch)
treed87ccb2ac0fbb4f5f0f57cae547c580490c7d6a9 /nova/scheduler
parent9279e0052f300eb0f64d63c970d34c050d744906 (diff)
downloadnova-fad69df25ffcea2a44cbf3ef636a68863a2d64d9.tar.gz
nova-fad69df25ffcea2a44cbf3ef636a68863a2d64d9.tar.xz
nova-fad69df25ffcea2a44cbf3ef636a68863a2d64d9.zip
Handle compute node records with no timestamp.
Commit 94560ab57d9fc23673f42017e6f2a78cb2b66b7a added a fast-path to avoid work when baremetal compute nodes haven't changed, but if the compute message has None for its updated-at timestamp (which can happen during startup) the comparison crashes. Change-Id: Ib8add431d975eee133deefea62eb53479a97396e
Diffstat (limited to 'nova/scheduler')
-rw-r--r--nova/scheduler/host_manager.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py
index 0c64d7aa2..d5b8aeb52 100644
--- a/nova/scheduler/host_manager.py
+++ b/nova/scheduler/host_manager.py
@@ -140,7 +140,8 @@ class HostState(object):
def update_from_compute_node(self, compute):
"""Update information about a host from its compute_node info."""
- if self.updated and self.updated > compute['updated_at']:
+ if (self.updated and compute['updated_at']
+ and self.updated > compute['updated_at']):
return
all_ram_mb = compute['memory_mb']