summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevananda van der Veen <devananda.vdv@gmail.com>2013-01-23 12:29:54 -0800
committerDevananda van der Veen <devananda.vdv@gmail.com>2013-01-23 13:14:11 -0800
commit6ada8271c11a9fd9d9336f6898a2e9a1fae65dc2 (patch)
tree9f5425ba4b8ea96cd7ca94ed72611f9052010b9d
parent13290fdb99e2454aa0cb6a994e175850b365c9e4 (diff)
downloadnova-6ada8271c11a9fd9d9336f6898a2e9a1fae65dc2.tar.gz
nova-6ada8271c11a9fd9d9336f6898a2e9a1fae65dc2.tar.xz
nova-6ada8271c11a9fd9d9336f6898a2e9a1fae65dc2.zip
_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
-rw-r--r--nova/compute/resource_tracker.py6
1 files 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."""