diff --git a/changelogs/fragments/534-ovirt_storage_domain-fix-inaccessible-error.yml b/changelogs/fragments/534-ovirt_storage_domain-fix-inaccessible-error.yml new file mode 100644 index 00000000..087b185d --- /dev/null +++ b/changelogs/fragments/534-ovirt_storage_domain-fix-inaccessible-error.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - ovirt_storage_domain - Fix inaccessible exception (https://github.com/oVirt/ovirt-ansible-collection/pull/534). diff --git a/plugins/modules/ovirt_storage_domain.py b/plugins/modules/ovirt_storage_domain.py index 9c49d436..032313b0 100644 --- a/plugins/modules/ovirt_storage_domain.py +++ b/plugins/modules/ovirt_storage_domain.py @@ -708,6 +708,9 @@ def control_state(sd_module): sd_service = sd_module._attached_sd_service(sd) sd = get_entity(sd_service) + if sd is None: + return + if sd.status == sdstate.LOCKED: wait( service=sd_service,