From cac34ac56881e618d1c363a41858eef68f9761be Mon Sep 17 00:00:00 2001 From: Mariusz Mazur Date: Thu, 30 May 2019 11:14:28 +0200 Subject: [PATCH] kubevirt_pvc: improve failure handling (#57163) --- lib/ansible/modules/cloud/kubevirt/kubevirt_pvc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/cloud/kubevirt/kubevirt_pvc.py b/lib/ansible/modules/cloud/kubevirt/kubevirt_pvc.py index de707723374..8e20c996e9c 100644 --- a/lib/ansible/modules/cloud/kubevirt/kubevirt_pvc.py +++ b/lib/ansible/modules/cloud/kubevirt/kubevirt_pvc.py @@ -391,6 +391,8 @@ class KubevirtPVC(KubernetesRawModule): if import_status == desired_cdi_status: return_obj = entity break + elif import_status == 'Failed': + raise CreatePVCFailed("PVC creation incomplete; importing data failed") else: return_obj = entity break