Skip to content

Commit

Permalink
Handle compute node records with no timestamp.
Browse files Browse the repository at this point in the history
Commit 94560ab 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.

Fixes bug: 1096719
Change-Id: Ib8add431d975eee133deefea62eb53479a97396e
(cherry picked from commit fad69df)
  • Loading branch information
rbtcollins authored and Pádraig Brady committed Mar 21, 2013
1 parent ad3bd39 commit 5b43cef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nova/scheduler/host_manager.py
Expand Up @@ -122,7 +122,8 @@ def update_capabilities(self, topic, capabilities=None, service=None):

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']

Expand Down

0 comments on commit 5b43cef

Please sign in to comment.