commit 2bf0eefe94dd6ad3df171f9be539a0545f272565 Author: Steve Baker Date: Fri Oct 2 10:28:00 2020 +1300 Clarify power state logging Some leftover logging displays a warning that the power state is ERROR even when it isn't. This change has a new logging message which includes the current and requested power state. The logging is info instead of warning because it is expected that the requested state is different from the power state. Change-Id: I4e592da89fa36963a66ebb1adfe6070dd13a6e6e diff --git a/ironic/conductor/utils.py b/ironic/conductor/utils.py index 473c3d4..dc52d33 100644 --- a/ironic/conductor/utils.py +++ b/ironic/conductor/utils.py @@ -241,11 +241,10 @@ def _can_skip_state_change(task, new_state): if new_state in (states.POWER_OFF, states.SOFT_POWER_OFF): _not_going_to_change() return True - else: - # if curr_state == states.ERROR: - # be optimistic and continue action - LOG.warning("Driver returns ERROR power state for node %s.", - node.uuid) + + LOG.info("Node %(node)s current power state is '%(state)s', " + "requested state is '%(new_state)s'.", + {'node': node.uuid, 'state': curr_state, 'new_state': new_state}) return False