Don't emit warning when ironic properties are zero
If an ironic node is registered without either of the 'memory_mb' or 'cpus' properties, the following warning messages are seen in the nova-compute logs: Warning, memory usage is 0 for <instance> on baremetal node <node>. Warning, number of cpus is 0 for <instance> on baremetal node <node>. As of the Rocky release [1], the standard compute resources (VCPU, MEMORY_MB, DISK_GB) are not registered with placement for ironic nodes. They were not required to be set since the Pike release, but still this warning is emitted. This change removes these warning messages. Backport: rocky, queens, pike [1] https://review.openstack.org/#/c/565841/ Change-Id: I342b9b12ec869431c3abad75eb8194c34151a281 Closes-Bug: #1794773
This commit is contained in:
parent
8c3d02ac3d
commit
63b9c88386
|
@ -902,21 +902,6 @@ class IronicDriver(virt_driver.ComputeDriver):
|
|||
return hardware.InstanceInfo(
|
||||
state=map_power_state(ironic_states.NOSTATE))
|
||||
|
||||
properties = self._parse_node_properties(node)
|
||||
memory_kib = properties['memory_mb'] * 1024
|
||||
if memory_kib == 0:
|
||||
LOG.warning("Warning, memory usage is 0 for "
|
||||
"%(instance)s on baremetal node %(node)s.",
|
||||
{'instance': instance.uuid,
|
||||
'node': instance.node})
|
||||
|
||||
num_cpu = properties['cpus']
|
||||
if num_cpu == 0:
|
||||
LOG.warning("Warning, number of cpus is 0 for "
|
||||
"%(instance)s on baremetal node %(node)s.",
|
||||
{'instance': instance.uuid,
|
||||
'node': instance.node})
|
||||
|
||||
return hardware.InstanceInfo(state=map_power_state(node.power_state))
|
||||
|
||||
def deallocate_networks_on_reschedule(self, instance):
|
||||
|
|
Loading…
Reference in New Issue