diff --git a/nova/servicegroup/drivers/db.py b/nova/servicegroup/drivers/db.py index 99bad8522ed0..fa440700a1bb 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): diff --git a/nova/tests/unit/cells/test_cells_state_manager.py b/nova/tests/unit/cells/test_cells_state_manager.py index 7f72a3d9f4ff..62e55779ef83 100644 --- a/nova/tests/unit/cells/test_cells_state_manager.py +++ b/nova/tests/unit/cells/test_cells_state_manager.py @@ -92,7 +92,8 @@ def _fake_service_get_all_by_binary_nodedown(cls, context, binary): return objects.Service(host=host, disabled=False, forced_down=False, - last_seen_up=last_seen) + last_seen_up=last_seen, + binary=binary) return [_service(*fake) for fake in FAKE_SERVICES] diff --git a/nova/tests/unit/servicegroup/test_db_servicegroup.py b/nova/tests/unit/servicegroup/test_db_servicegroup.py index aa6472115b0c..d7f857a37b29 100644 --- a/nova/tests/unit/servicegroup/test_db_servicegroup.py +++ b/nova/tests/unit/servicegroup/test_db_servicegroup.py @@ -37,6 +37,7 @@ class DBServiceGroupTestCase(test.NoDBTestCase): service = objects.Service( host='fake-host', topic='compute', + binary='nova-compute', created_at=now, updated_at=now, last_seen_up=now,