Browse Source

Merge "Init HostState.failed_builds" into stable/queens

tags/17.0.12
Zuul 2 months ago
parent
commit
95a35cbee4
2 changed files with 3 additions and 0 deletions
  1. 1
    0
      nova/scheduler/host_manager.py
  2. 2
    0
      nova/tests/unit/scheduler/test_host_manager.py

+ 1
- 0
nova/scheduler/host_manager.py View File

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

+ 2
- 0
nova/tests/unit/scheduler/test_host_manager.py View File

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

Loading…
Cancel
Save