From 362e603eb34d497ef237b3d40ef7eda68be00f10 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Thu, 3 Jan 2019 14:52:37 +0100 Subject: [PATCH] ovirt_host: Improve failed upgrade check (#50489) --- lib/ansible/modules/cloud/ovirt/ovirt_host.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host.py b/lib/ansible/modules/cloud/ovirt/ovirt_host.py index 685efe3daf..bdbe3a7b31 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host.py @@ -520,9 +520,12 @@ def main(): event for event in events_service.list( from_=int(last_event.id), - # Fail upgrade if migration fails. - search='type=65 or type=140', - ) + # Fail upgrade if migration fails: + # 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 ), reboot=module.params['reboot_after_upgrade'],