Skip to content

Commit

Permalink
ovirt_host: fix restarted wait (#551)
Browse files Browse the repository at this point in the history
* ovirt_host: fix restarted wait

* Add changelog
  • Loading branch information
mnecas authored Jun 22, 2022
1 parent c0931ee commit e669445
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- ovirt_host - Fix restarted wait condition (https://github.com/oVirt/ovirt-ansible-collection/pull/551).
3 changes: 2 additions & 1 deletion plugins/modules/ovirt_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,10 @@ def main():
fence_type='stop',
)
elif state == 'restarted':
result_state = hoststate.MAINTENANCE if host.status == hoststate.MAINTENANCE else hoststate.UP
ret = hosts_module.action(
action='fence',
wait_condition=lambda h: h.status == hoststate.UP,
wait_condition=lambda h: h.status == result_state,
fail_condition=hosts_module.failed_state_after_reinstall,
fence_type='restart',
)
Expand Down

0 comments on commit e669445

Please sign in to comment.