Arik Hadas has uploaded a new change for review.

Change subject: core: remove job with migration step on engine startup
......................................................................

core: remove job with migration step on engine startup

In I5973c we removed jobs that cannot be tracked after engine restart.
Proper handling for internal migration which is represented as a step
was missing, so it is added in this patch.

Change-Id: If2de0753cf2773b84a3933f8d1b22516b236ee9b
Bug-Url: https://bugzilla.redhat.com/1099505
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M packaging/dbscripts/job_sp.sql
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/31490/1

diff --git a/packaging/dbscripts/job_sp.sql b/packaging/dbscripts/job_sp.sql
index 1694f77..142c742 100644
--- a/packaging/dbscripts/job_sp.sql
+++ b/packaging/dbscripts/job_sp.sql
@@ -477,7 +477,11 @@
 BEGIN
     DELETE FROM job
     WHERE (status = 'STARTED'
-    AND    action_type IN ('MigrateVm', 'MigrateVmToServer', 
'InternalMigrateVm', 'RunVm', 'RunVmOnce'));
+    AND    action_type IN ('MigrateVm', 'MigrateVmToServer', 'RunVm', 
'RunVmOnce'));
+
+    DELETE FROM job
+    WHERE job_id IN
+          (SELECT job_id from step WHERE (status = 'STARTED' AND 
step_type='MIGRATE_VM'));
 END; $procedure$
 LANGUAGE plpgsql;
 


-- 
To view, visit http://gerrit.ovirt.org/31490
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2de0753cf2773b84a3933f8d1b22516b236ee9b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to