Bug 1247944 - Cleaning zombie tasks don't rollback the tasks
Cleaning zombie tasks don't rollback the tasks
Product: oVirt
Classification: Community
Component: ovirt-engine-installer (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Sandro Bonazzola
Pavel Stehlik
Depends On:
  Show dependency treegraph
Reported: 2015-07-29 06:05 EDT by Petr Kubica
Modified: 2015-08-11 04:38 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-08-02 01:15:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
engine-logs (1.04 MB, application/x-gzip)
2015-07-29 06:05 EDT, Petr Kubica
no flags Details

  None (edit)
Description Petr Kubica 2015-07-29 06:05:22 EDT
Created attachment 1057276 [details]

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:

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 10:32:11 EDT
I'm not really sure about how to rollback the action of a zombie task.
Comment 2 Oved Ourfali 2015-07-30 02:15:30 EDT
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 01:15:52 EDT
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 04:27:47 EDT
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 04:38:49 EDT
(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.

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