Merge "Init HostState.failed_builds" into stable/queens

This commit is contained in:
Zuul 2019-07-04 17:10:51 +00:00 committed by Gerrit Code Review
commit 95a35cbee4
2 changed files with 3 additions and 0 deletions

View File

@ -127,6 +127,7 @@ class HostState(object):
# Additional host information from the compute node stats: # Additional host information from the compute node stats:
self.num_instances = 0 self.num_instances = 0
self.num_io_ops = 0 self.num_io_ops = 0
self.failed_builds = 0
# Other information # Other information
self.host_ip = None self.host_ip = None

View File

@ -1415,3 +1415,5 @@ class HostStateTestCase(test.NoDBTestCase):
# Because compute record not ready, the update of free ram # Because compute record not ready, the update of free ram
# will not happen and the value will still be 0 # will not happen and the value will still be 0
self.assertEqual(0, host.free_ram_mb) self.assertEqual(0, host.free_ram_mb)
# same with failed_builds
self.assertEqual(0, host.failed_builds)