Add a return after saving node power state

if successfully sync power state, we should just return 0 after node.save(),
but currently we have to go to next condition node.power_state == power_state

Change-Id: I49cc6e1b2dd957d4a60c611184cc640ca30773fa
This commit is contained in:
Zhenguo Niu 2015-03-24 21:04:03 +08:00
parent 3bdf13db77
commit 6f3dfe3b59

View File

@ -1986,6 +1986,7 @@ def do_sync_power_state(task, count):
{'node': node.uuid, 'state': power_state})
node.power_state = power_state
node.save()
return 0
# If the node is now in the expected state, reset the counter
# otherwise, if we've exceeded the retry limit, stop here