diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index 13a6bcaab4c1..1d7814561e83 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -182,9 +182,11 @@ class HostState(object): if least_gb is not None: if least_gb > free_gb: # can occur when an instance in database is not on host - LOG.warn(_LW("Host has more disk space than database " - "expected (%(physical)sgb > %(database)sgb)"), - {'physical': least_gb, 'database': free_gb}) + LOG.warn(_LW("Host %(hostname)s has more disk space than " + "database expected " + "(%(physical)sgb > %(database)sgb)"), + {'physical': least_gb, 'database': free_gb, + 'hostname': compute['hypervisor_hostname']}) free_gb = min(least_gb, free_gb) free_disk_mb = free_gb * 1024 diff --git a/nova/tests/scheduler/test_host_manager.py b/nova/tests/scheduler/test_host_manager.py index 74ca092f312f..ec28e2d95970 100644 --- a/nova/tests/scheduler/test_host_manager.py +++ b/nova/tests/scheduler/test_host_manager.py @@ -282,10 +282,11 @@ class HostManagerTestCase(test.NoDBTestCase): db.compute_node_get_all(context).AndReturn(fakes.COMPUTE_NODES) # node 3 host physical disk space is greater than database - host_manager.LOG.warn(_LW("Host has more disk space than database " - "expected (%(physical)sgb > " + host_manager.LOG.warn(_LW("Host %(hostname)s has more disk space than " + "database expected (%(physical)sgb > " "%(database)sgb)"), - {'physical': 3333, 'database': 3072}) + {'physical': 3333, 'database': 3072, + 'hostname': 'node3'}) # Invalid service host_manager.LOG.warn(_LW("No service for compute ID %s"), 5)