Skip to content

Commit

Permalink
ovirt_host: Fix fail condititon of upgrade (ansible#46104)
Browse files Browse the repository at this point in the history
Signed-off-by: Ondra Machacek <[email protected]>
  • Loading branch information
machacekondra authored and gundalow committed Sep 28, 2018
1 parent e76596a commit 142d1f1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/ansible/modules/cloud/ovirt/ovirt_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,16 @@ def main():
action_condition=lambda h: h.update_available,
wait_condition=lambda h: h.status == result_state,
post_action=lambda h: time.sleep(module.params['poll_interval']),
fail_condition=hosts_module.failed_state_after_reinstall,
fail_condition=lambda h: hosts_module.failed_state_after_reinstall(h) or (
len([
event
for event in events_service.list(
from_=int(last_event.id),
# Fail upgrade if migration fails.
search='type=65 or type=140',
)
]) > 0
),
reboot=module.params['reboot_after_upgrade'],
)
elif state == 'iscsidiscover':
Expand Down

0 comments on commit 142d1f1

Please sign in to comment.