Handle compute node records with no timestamp.
Commit 94560ab57d
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
This commit is contained in:
parent
9279e0052f
commit
fad69df25f
|
@ -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']
|
||||
|
||||
|
|
Loading…
Reference in New Issue