ovirt_host: Improve failed upgrade check (#50489)

pull/4420/head
Ondra Machacek 2019-01-03 14:52:37 +01:00 committed by ansibot
parent df93e08d6a
commit 362e603eb3
1 changed files with 6 additions and 3 deletions

View File

@ -520,9 +520,12 @@ def main():
event event
for event in events_service.list( for event in events_service.list(
from_=int(last_event.id), from_=int(last_event.id),
# Fail upgrade if migration fails. # Fail upgrade if migration fails:
search='type=65 or type=140', # 17: Failed to switch Host to Maintenance mode
) # 65, 140: Migration failed
# 166: No available host was found to migrate VM
search='type=65 or type=140 or type=166 or type=17',
) if host.name in event.description
]) > 0 ]) > 0
), ),
reboot=module.params['reboot_after_upgrade'], reboot=module.params['reboot_after_upgrade'],