Description of problem: When for whatever reason a template image copy is deleted on storage, but is still present in the rhev manager database, the template cannot be removed Version-Release number of selected component (if applicable): rhevm 3.4.1 How reproducible: 100% Steps to Reproduce: 1 Create a template, with at least one disk image 2 Copy the disk image to a second storage domain 3 Remove the disk image from one of the storage domains, using vdsClient on the SPM 4 Try to create a vm from this template (fails) 5 Try to remove the template from the RHEV admin portal (fails) Actual results: Trying to remove the template fails. Expected results: Deleting a template should work Additional info: Relevant messages in engine.log: 2014-12-11 09:39:22,166 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.DeleteImageGroupVDSCommand] (org.ovirt.thread.pool-4-thread-46) [8beff1f] Command DeleteImageGroupVDSCommand( storagePoolId = 0ba59901-a905-44c8-a6d5-f67b9bb3daa1, ignoreFailoverLimit = false, storageDomainId = dda045f1-7080-4c64-b0c8-26f9031c36cd, imageGroupId = 94e2ac52-87bb-41e2-9655-565b5a65a891, postZeros = false, forceDelete = false) execution failed. Exception: IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Image does not exist in domain: 'image=94e2ac52-87bb-41e2-9655-565b5a65a891, domain=dda045f1-7080-4c64-b0c8-26f9031c36cd' 2014-12-11 09:39:22,167 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.DeleteImageGroupVDSCommand] (org.ovirt.thread.pool-4-thread-46) [8beff1f] FINISH, DeleteImageGroupVDSCommand, log id: 3f9c3572 2014-12-11 09:39:22,167 ERROR [org.ovirt.engine.core.bll.RemoveTemplateSnapshotCommand] (org.ovirt.thread.pool-4-thread-46) [8beff1f] Command org.ovirt.engine.core.bll.RemoveTemplateSnapshotCommand throw Vdc Bll exception. With error message VdcBLLException: org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Image does not exist in domain: 'image=94e2ac52-87bb-41e2-9655-565b5a65a891, domain=dda045f1-7080-4c64-b0c8-26f9031c36cd' (Failed with error ImageDoesNotExistInDomainError and code 268) 2014-12-11 09:39:22,579 ERROR [org.ovirt.engine.core.bll.RemoveTemplateSnapshotCommand] (org.ovirt.thread.pool-4-thread-46) [8beff1f] Transaction rolled-back for command: org.ovirt.engine.core.bll.RemoveTemplateSnapshotCommand. Relevant messages in vdsm.log Thread-105880::ERROR::2014-12-11 09:39:20,931::task::866::TaskManager.Task::(_setError) Task=`c1ec5206-5deb-4bd8-933b-6974ad1b7cc8`::Unexpected error Traceback (most recent call last): File "/usr/share/vdsm/storage/task.py", line 873, in _run return fn(*args, **kargs) File "/usr/share/vdsm/logUtils.py", line 45, in wrapper res = f(*args, **kwargs) File "/usr/share/vdsm/storage/hsm.py", line 1513, in deleteImage raise se.ImageDoesNotExistInSD(imgUUID, sdUUID) ImageDoesNotExistInSD: Image does not exist in domain: 'image=94e2ac52-87bb-41e2-9655-565b5a65a891, domain=dda045f1-7080-4c64-b0c8-26f9031c36cd' Thread-105880::DEBUG::2014-12-11 09:39:20,934::task::885::TaskManager.Task::(_run) Task=`c1ec5206-5deb-4bd8-933b-6974ad1b7cc8`::Task._run: c1ec5206-5deb-4bd8-933b-6974ad1b7cc8 ('dda045f1-7080-4c64-b0c8-26f9031c36cd', '0ba59901-a905-44c8-a6d5-f67b9bb3daa1', '94e2ac52-87bb-41e2-9655-565b5a65a891', 'false', 'false') {} failed - stopping task
Liron, shouldn't we just roll-forward in these scenarios?
Allon, we should..but that wasn't implemented :-).
OK, so let's try to handle it for 3.6.0.
(In reply to Liron Aravot from comment #2) > Allon, we should..but that wasn't implemented :-). We're redoing this command as part of the SPM removal. Worth considering handling this BZ there.
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.
Maor, doesn't your recent work on deleting images cover this scenario too?
yes, BZ1328071 should fix that.
*** This bug has been marked as a duplicate of bug 1328071 ***