Bug 1247944

Summary: Cleaning zombie tasks don't rollback the tasks
Product: [Retired] oVirt Reporter: Petr Kubica <pkubica>
Component: ovirt-engine-installerAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6CC: amureini, bugs, ecohen, gklein, lsurette, masayag, oourfali, rbalakri, sbonazzo, stirabos, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-02 05:15:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine-logs none

Description Petr Kubica 2015-07-29 10:05:22 UTC
Created attachment 1057276 [details]
engine-logs

Description of problem:
After cleaning the zombie tasks, the entities created with these tasks are invalid but they look like as completed and usable.

I tested only making a template from bug https://bugzilla.redhat.com/show_bug.cgi?id=1202333 and after cleaning the zombie and successfully unlocked all entities during update there is a new template with invalid disk image. So this template cannot be used to create VM from this template.

2015-07-29 11:58:06,017 ERROR [org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand] (default task-60) [4a5a22d2] Command 'org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand' failed: VdcBLLException: org.o
virt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Image does not exist in domain: u'image=43f73dd2-0e5c-40b0-82e2-25930363e37a, domain=815e24eb-2
f01-4343-a033-851d6ec73133' (Failed with error ImageDoesNotExistInDomainError and code 268)

I expected that all created entities from these zombie tasks will be deleted during setup.

Version-Release number of selected component (if applicable):
update 3.5.x to 3.6.0-3

How reproducible:
Always

Steps to Reproduce:
1. Have a latest 3.5.x engine with host and created VM with a disk
2. Start make a template from this VM and stop network service on the host, so it will be created a task which cannot be completed.
3. Set the time to recognize the tasks as zombie: 
engine-config -s "AsyncTaskZombieTaskLifeInMinutes=10" set the time to 10 minutes
4. update packages to 3.6.0.-3
5. Before setup I must use a workaround about missing function to cleaning the zombie: https://bugzilla.redhat.com/show_bug.cgi?id=1235707#c9
6. engine-setup
7. After setup, there is a uncompleted template in a engine looks like fully usable

Additional info:
attached logs from engine

Comment 1 Sandro Bonazzola 2015-07-29 14:32:11 UTC
I'm not really sure about how to rollback the action of a zombie task.
Oved?

Comment 2 Oved Ourfali 2015-07-30 06:15:30 UTC
I don't think that we can fix such a thing.
Such commands and tasks can create several entities.

Putting needinfo on Moti to share his thoughts around that.

Comment 3 Oved Ourfali 2015-08-02 05:15:52 UTC
Talking offline with Eli, one should make sure his environment is in consistent state before upgrading. The utilities to unlock entities are an "emergency" tools in cases where he didn't do so, and needs assistance to get out of this situation. It would be better to start the engine again, and let things end properly.

Also, setting the timeout to 10 minutes doesn't make sense. I guess after the default timeout (which is 3000 minutes), someone would understand something is wrong.

Closing as NOTABUG.

Comment 4 Petr Kubica 2015-08-11 08:27:47 UTC
For testing I cannot wait 3000 minutes to mark the task as a zombie, so I change the value to 10 minutes. That is the only reason to change the value.

Comment 5 Oved Ourfali 2015-08-11 08:38:49 UTC
(In reply to Petr Kubica from comment #4)
> For testing I cannot wait 3000 minutes to mark the task as a zombie, so I
> change the value to 10 minutes. That is the only reason to change the value.

Okay. Thanks for clarifying.