Allon Mureinik has submitted this change and it was merged.
Change subject: core: handle failed import of template
......................................................................
core: handle failed import of template
When failing during the import of a template, the engine should attempt to
delete the created images and not just remove it from the db to avoid
storage leak and possible CDA message/inconsistent data during another
try to import the template with same image guids.
If any images are failed to be removed, they would remain with ILLEGAL
status - an attempt to import again with the same ID will result in CDA
message.
Change-Id: If90414b6c50d922b510a10e20e0774bdbec9c05b
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=908327
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/DiskImagesValidator.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmTemplateCommandTest.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/TestHelperImportVmTemplateCommand.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/DiskImagesValidatorTest.java
8 files changed, 99 insertions(+), 75 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/14839
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If90414b6c50d922b510a10e20e0774bdbec9c05b
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>