The commit I4dfbea27ce6c3eecc1a8658b1f9dc0feb2298705 changes
'HostState.metrics' to 'objects.MonitorMetricList'. But MetricWeigher
still use the old dictionary of 'host_manager.MetricItem'. This patch
corrects the behavior of MetricWeigher with related tests, and delete
unused MetricItem.
Closes-Bug: #1493680
(cherry picked from commit fd2b868d41a632748939b82ed1b8927adcdfb113)
Fix NoneType error when calling MetricsWeigher
(this is a squashed commit since commit fd2b868 was buggy)
Given that dict comprehensions don't allow to have None as a list, we had
a problem with the Ironic gate-ironic-inspector-dsvm job because
host_state.metrics was set to None by default.
Adding a unittest to make sure we don't regress.
Closes-Bug: #1499271
(cherry picked from commit ccea5d6b0ace535b375d3e63bd572885cb5dbc91)
Reviewed: https:/ /review. openstack. org/227744 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=51d74bdf18d f39695ad5e500db 6db830f21da36a
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit 51d74bdf18df396 95ad5e500db6db8 30f21da36a
Author: Yingxin Cheng <email address hidden>
Date: Wed Sep 9 11:20:19 2015 -0400
Fix MetricWeigher to use MonitorMetricList
The commit I4dfbea27ce6c3e ecc1a8658b1f9dc 0feb2298705 changes metrics' to 'objects. MonitorMetricLi st'. But MetricWeigher MetricItem' . This patch
'HostState.
still use the old dictionary of 'host_manager.
corrects the behavior of MetricWeigher with related tests, and delete
unused MetricItem.
Co-Authored-By: Sylvain Bauza <email address hidden>
Closes-Bug: #1493680 48939b82ed1b892 7adcdfb113)
(cherry picked from commit fd2b868d41a6327
Fix NoneType error when calling MetricsWeigher
(this is a squashed commit since commit fd2b868 was buggy) inspector- dsvm job because state.metrics was set to None by default.
Given that dict comprehensions don't allow to have None as a list, we had
a problem with the Ironic gate-ironic-
host_
Adding a unittest to make sure we don't regress.
Closes-Bug: #1499271 b375d3e63bd5728 85cb5dbc91)
(cherry picked from commit ccea5d6b0ace535
Change-Id: I9690bc4f6f1dca 8f2bf8c5a83f16a f6200015506