From 6ada8271c11a9fd9d9336f6898a2e9a1fae65dc2 Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Wed, 23 Jan 2013 12:29:54 -0800 Subject: _sync_compute_node should log host and nodename ResourceTracker:_sync_compute_node logs the host name when it creates or updates the record for a compute node. However, with baremetal, one compute_node (host) may actually manage many separate physical nodes, identified by unique nodenames. This patch updates the LOG.info calls to include the nodename. Change-Id: I69c66b84394b2a740a7ca9d2781015a7e1ff9998 --- nova/compute/resource_tracker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py index be0360185..f5d3a8008 100644 --- a/nova/compute/resource_tracker.py +++ b/nova/compute/resource_tracker.py @@ -293,12 +293,14 @@ class ResourceTracker(object): # Need to create the ComputeNode record: resources['service_id'] = service['id'] self._create(context, resources) - LOG.info(_('Compute_service record created for %s ') % self.host) + LOG.info(_('Compute_service record created for %(host)s:%(node)s') + % {'host': self.host, 'node': self.nodename}) else: # just update the record: self._update(context, resources, prune_stats=True) - LOG.info(_('Compute_service record updated for %s ') % self.host) + LOG.info(_('Compute_service record updated for %(host)s:%(node)s') + % {'host': self.host, 'node': self.nodename}) def _create(self, context, values): """Create the compute node in the DB.""" -- cgit