Backport/2.8/57163 (#57173)

* kubevirt_pvc: improve failure handling (#57163)


(cherry picked from commit cac34ac568)

* kubevirt_pvc: changelog fragment
This commit is contained in:
Mariusz Mazur 2019-05-30 19:16:02 +02:00 committed by Toshio Kuratomi
parent 7d0237f4db
commit 01c6915eba
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- Properly handle data importer failures on PVC creation, instead of timing out.

View file

@ -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