ovirt_host: Fix fail condititon of upgrade (#46104)
Signed-off-by: Ondra Machacek <omachace@redhat.com>
This commit is contained in:
parent
e76596a115
commit
142d1f1f1c
1 changed files with 10 additions and 1 deletions
|
@ -515,7 +515,16 @@ def main():
|
||||||
action_condition=lambda h: h.update_available,
|
action_condition=lambda h: h.update_available,
|
||||||
wait_condition=lambda h: h.status == result_state,
|
wait_condition=lambda h: h.status == result_state,
|
||||||
post_action=lambda h: time.sleep(module.params['poll_interval']),
|
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'],
|
reboot=module.params['reboot_after_upgrade'],
|
||||||
)
|
)
|
||||||
elif state == 'iscsidiscover':
|
elif state == 'iscsidiscover':
|
||||||
|
|
Loading…
Reference in a new issue