Skip to content

Commit b01bc2f

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Init HostState.failed_builds" into stable/stein
2 parents 5d121a8 + 725b37f commit b01bc2f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

nova/scheduler/host_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def __init__(self, host, node, cell_uuid):
126126
# Additional host information from the compute node stats:
127127
self.num_instances = 0
128128
self.num_io_ops = 0
129+
self.failed_builds = 0
129130

130131
# Other information
131132
self.host_ip = None

nova/tests/unit/scheduler/test_host_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,3 +1455,5 @@ def test_stat_consumption_from_compute_node_not_ready(self):
14551455
# Because compute record not ready, the update of free ram
14561456
# will not happen and the value will still be 0
14571457
self.assertEqual(0, host.free_ram_mb)
1458+
# same with failed_builds
1459+
self.assertEqual(0, host.failed_builds)

0 commit comments

Comments
 (0)