summaryrefslogtreecommitdiff
path: root/nova/servicegroup
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem@us.ibm.com>2016-02-25 18:21:54 -0500
committerMatt Riedemann <mriedem@us.ibm.com>2016-02-26 12:57:57 -0500
commitd1cc60a21559e6065b41b1ecbd73df12bab77b6a (patch)
treeeae62b9676786f94a1b4095a89425297010171bc /nova/servicegroup
parent8974a30914ae26c0b1bb9386e46af877de737f61 (diff)
downloadnova-d1cc60a21559e6065b41b1ecbd73df12bab77b6a.tar.gz
Add service binary/host to service is down log for context
When we're logging that a service appears to be down in the DB service group drive, add the service binary and host to the message for context. Change-Id: I8f676f7b498f4d7cb9b574a401ec892c2a3aacd3 Related-Bug: #1549854
Diffstat (limited to 'nova/servicegroup')
-rw-r--r--nova/servicegroup/drivers/db.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/nova/servicegroup/drivers/db.py b/nova/servicegroup/drivers/db.py
index 99bad8522e..fa440700a1 100644
--- a/nova/servicegroup/drivers/db.py
+++ b/nova/servicegroup/drivers/db.py
@@ -75,9 +75,11 @@ class DbDriver(base.Driver):
elapsed = timeutils.delta_seconds(last_heartbeat, timeutils.utcnow())
is_up = abs(elapsed) <= self.service_down_time
if not is_up:
- LOG.debug('Seems service is down. Last heartbeat was %(lhb)s. '
- 'Elapsed time is %(el)s',
- {'lhb': str(last_heartbeat), 'el': str(elapsed)})
+ LOG.debug('Seems service %(binary)s on host %(host)s is down. '
+ 'Last heartbeat was %(lhb)s. Elapsed time is %(el)s',
+ {'binary': service_ref.get('binary'),
+ 'host': service_ref.get('host'),
+ 'lhb': str(last_heartbeat), 'el': str(elapsed)})
return is_up
def _report_state(self, service):