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
This commit is contained in:
parent
33a34ce364
commit
2bf0eefe94
@ -241,11 +241,10 @@ def _can_skip_state_change(task, new_state):
|
|||||||
if new_state in (states.POWER_OFF, states.SOFT_POWER_OFF):
|
if new_state in (states.POWER_OFF, states.SOFT_POWER_OFF):
|
||||||
_not_going_to_change()
|
_not_going_to_change()
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
# if curr_state == states.ERROR:
|
LOG.info("Node %(node)s current power state is '%(state)s', "
|
||||||
# be optimistic and continue action
|
"requested state is '%(new_state)s'.",
|
||||||
LOG.warning("Driver returns ERROR power state for node %s.",
|
{'node': node.uuid, 'state': curr_state, 'new_state': new_state})
|
||||||
node.uuid)
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user