Created attachment 1097104 [details] engine logs Description of problem: Creating of template never marked as finished when it was completed during setup of engine. Template was successfully created and it can be used for creating new VM. Problem is only in marking task as completed. Version-Release number of selected component (if applicable): rhevm-3.6.0.3-0.1.el6.noarch How reproducible: 100% Steps to Reproduce: 1. Have an engine with VM 2. Start creating template of VM and then stop ovirt-engine service 3. Run upgrade (engine-setup) 4. Wait for completing of the task. 5. After successfully completed setup, check the task in tasks panel (Task is never marked as completed (Finalizing) Actual results: Task isn't marked as completed Expected results: Task should be marked as completed Additional info: Attached logs from engine
Oved, shouldn't upgrade be blocked if there are running tasks/command entities/compensation in the db ?
It should.. For sure for tasks, and perhaps also for command entities. Didi?
(In reply to Oved Ourfali from comment #2) > It should.. For sure for tasks, and perhaps also for command entities. > > Didi? It seems we do, but only after clearing them first... I might be missing something. Simone, any idea?
(In reply to Yedidyah Bar David from comment #3) > (In reply to Oved Ourfali from comment #2) > > It should.. For sure for tasks, and perhaps also for command entities. > > > > Didi? > > It seems we do, but only after clearing them first... I might be missing > something. Simone, any idea? Perhaps in the reporter's scenario the tasks were cleared, however the job/steps refer to a task which is deleted, therefore it (the step which represents the task) cannot longer be terminated by the task monitoring. Where is the logic for clearing open entities (tasks, commands, jobs - ?) before upgrade is applied ?
(In reply to Moti Asayag from comment #4) > (In reply to Yedidyah Bar David from comment #3) > > (In reply to Oved Ourfali from comment #2) > > > It should.. For sure for tasks, and perhaps also for command entities. > > > > > > Didi? > > > > It seems we do, but only after clearing them first... I might be missing > > something. Simone, any idea? > > Perhaps in the reporter's scenario the tasks were cleared, however the > job/steps refer to a task which is deleted, therefore it (the step which > represents the task) cannot longer be terminated by the task monitoring. > > Where is the logic for clearing open entities (tasks, commands, jobs - ?) > before upgrade is applied ? packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py _validateZombies clears stuff _validateAsyncTasks runs later and aborts if it finds stuff I didn't carefully check what each does.
Please fill in whiteboard in accordance to http://etherpad.corp.redhat.com/whiteboard as well as severity.
(In reply to Oved Ourfali from comment #2) > It should.. For sure for tasks, It seems that the tasks cleaning script clears all steps which has tasks. We should either delete the entire jobs and not only the steps, or not clear any step/job and just update their statuses to 'Unknown' at setup time, and let the jobs cleanup manager (scheduled in engine) handle the clearing of them from the db. The result of running the taskcleaner.sh should be no jobs/steps with 'STARTED' status. > and perhaps also for command entities. The packaging/setup/dbutils/taskcleaner.sh script refers also to command-entities.
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Moving to POST. This should be backported.
Verified on 3.6.2-3
oVirt 3.6.1 has been released, closing current release