1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

ovirt_storage_domain: Improve logic for state controlling. (#46951)

This commit is contained in:
Joey 2018-10-16 17:26:31 +08:00 committed by ansibot
parent 9a5561da0f
commit c3cc2ecc5b

View file

@ -565,6 +565,13 @@ def control_state(sd_module):
return
sd_service = sd_module._service.service(sd.id)
# In the case of no status returned, it's an attached storage domain.
# Redetermine the corresponding serivce and entity:
if sd.status is None:
sd_service = sd_module._attached_sd_service(sd)
sd = get_entity(sd_service)
if sd.status == sdstate.LOCKED:
wait(
service=sd_service,