From 2f5c081012feac21254893528f5a40174ac229cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ne=C4=8Das?= Date: Mon, 13 Jun 2022 09:56:31 +0200 Subject: [PATCH 1/2] ovirt_storage_domain: Fix error for inaccessible storage domain --- plugins/modules/ovirt_storage_domain.py | 3 +++ 1 file changed, 3 insertions(+) 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, From a577c36a7e04503fa0d1f9a664da331224b8e96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ne=C4=8Das?= Date: Mon, 13 Jun 2022 09:58:58 +0200 Subject: [PATCH 2/2] Add changelog --- .../534-ovirt_storage_domain-fix-inaccessible-error.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/534-ovirt_storage_domain-fix-inaccessible-error.yml 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).