Bug 1179834 - [BLOCKED] A template with disk images inconsistent with the rhev db, cannot be deleted
Summary: [BLOCKED] A template with disk images inconsistent with the rhev db, cannot b...
Keywords:
Status: CLOSED DUPLICATE of bug 1328071
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.3-1
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Liron Aravot
QA Contact: Aharon Canan
URL:
Whiteboard:
Depends On: 1185830
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-07 16:04 UTC by Tim Speetjens
Modified: 2019-08-15 04:12 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-08 13:35:00 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tim Speetjens 2015-01-07 16:04:21 UTC
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

Comment 1 Allon Mureinik 2015-01-08 11:57:24 UTC
Liron, shouldn't we just roll-forward in these scenarios?

Comment 2 Liron Aravot 2015-01-08 13:19:30 UTC
Allon, we should..but that wasn't implemented :-).

Comment 3 Allon Mureinik 2015-01-08 13:20:38 UTC
OK, so let's try to handle it for 3.6.0.

Comment 4 Allon Mureinik 2015-03-22 14:58:00 UTC
(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.

Comment 5 Yaniv Lavi 2016-05-09 10:59:00 UTC
oVirt 4.0 Alpha has been released, moving to oVirt 4.0 Beta target.

Comment 8 Allon Mureinik 2016-06-08 13:11:44 UTC
Maor, doesn't your recent work on deleting images cover this scenario too?

Comment 9 Maor 2016-06-08 13:35:00 UTC
yes, BZ1328071 should fix that.

Comment 10 Maor 2016-06-08 13:35:23 UTC

*** This bug has been marked as a duplicate of bug 1328071 ***


Note You need to log in before you can comment on or make changes to this bug.