diff options
author | Steve Baker <sbaker@redhat.com> | 2020-10-02 10:28:00 +1300 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2020-10-02 10:28:00 +1300 |
commit | 2bf0eefe94dd6ad3df171f9be539a0545f272565 (patch) | |
tree | 4a1667d70eade31ea47bf64ccc90b303149c8802 /ironic/conductor | |
parent | 33a34ce364ce28077a114b7d1a80fd719521580a (diff) | |
download | ironic-2bf0eefe94dd6ad3df171f9be539a0545f272565.tar.gz |
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
Diffstat (limited to 'ironic/conductor')
-rw-r--r-- | ironic/conductor/utils.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ironic/conductor/utils.py b/ironic/conductor/utils.py index 473c3d478..dc52d33b0 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 |