nova/nova/virt/ironic
Mark Goddard e46019a6e5 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 Stein 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/

NOTE(mriedem): The original commit message on this change incorrectly
said that [1] was made in Rocky but it was actually made in Stein.
The important part is that the "memory_mb" and "cpus" properties on
the node could be 0 since Pike and if they are 0, it just means
that the related standard resource class inventory is not reported
to the placement service and thus the warnings are noise.

Change-Id: I342b9b12ec869431c3abad75eb8194c34151a281
Closes-Bug: #1794773
(cherry picked from commit 63b9c88386)
(cherry picked from commit 0794345ecd)
2019-02-22 14:46:12 +00:00
..
__init__.py Import Ironic Driver & supporting files - part 1 2014-09-05 19:00:12 -04:00
client_wrapper.py Implement get_traits() for the ironic virt driver 2018-01-30 20:45:27 -05:00
driver.py Don't emit warning when ironic properties are zero 2019-02-22 14:46:12 +00:00
ironic_states.py Ironic: Call unprovison for nodes in DEPLOYING state 2015-09-09 10:38:22 +01:00
patcher.py Don't JSON encode instance_info.traits for ironic 2018-02-15 17:06:16 +00:00