diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index bb9624a2a3f4..8028b5e939b6 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -126,6 +126,7 @@ class HostState(object): # Additional host information from the compute node stats: self.num_instances = 0 self.num_io_ops = 0 + self.failed_builds = 0 # Other information self.host_ip = None diff --git a/nova/tests/unit/scheduler/test_host_manager.py b/nova/tests/unit/scheduler/test_host_manager.py index a4fc0d840fbc..a42370da8fd5 100644 --- a/nova/tests/unit/scheduler/test_host_manager.py +++ b/nova/tests/unit/scheduler/test_host_manager.py @@ -1455,3 +1455,5 @@ class HostStateTestCase(test.NoDBTestCase): # Because compute record not ready, the update of free ram # will not happen and the value will still be 0 self.assertEqual(0, host.free_ram_mb) + # same with failed_builds + self.assertEqual(0, host.failed_builds)