Michael Kublin has uploaded a new change for review.

Change subject: engine: Fixing compensation for RemoveVmTemplateCommand and 
possible other commands
......................................................................

engine: Fixing compensation for RemoveVmTemplateCommand and possible other 
commands

So, the fix is simple - change name.
After a restart of engine - RemoveVmTemplate command is created based on 
parameters,
but with old name vmTemplateId did not pass json serialization and get default 
value - Guid.Empty,
which is id of blank template.
After that , we are trying to delete blank template and failed (We are lucky) - 
means command failed, a origin template left
with status Locked

Change-Id: Ifb042d6cb8276a3c457a94823e90c1e6936cfa69
Signed-off-by: Michael Kublin <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmTemplateParametersBase.java
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/11813/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmTemplateParametersBase.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmTemplateParametersBase.java
index bfda70e..2a520b5 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmTemplateParametersBase.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmTemplateParametersBase.java
@@ -7,7 +7,7 @@
 public class VmTemplateParametersBase extends VdcActionParametersBase 
implements java.io.Serializable {
     private static final long serialVersionUID = -8930994274659598061L;
     private boolean removeTemplateFromDb;
-    private Guid _vmTemplateId = new Guid();
+    private Guid vmTemplateId = Guid.Empty;
     private Guid quotaId;
     private boolean privateCheckDisksExists;
 
@@ -20,11 +20,11 @@
     }
 
     public VmTemplateParametersBase(Guid vmTemplateId) {
-        _vmTemplateId = vmTemplateId;
+        this.vmTemplateId = vmTemplateId;
     }
 
     public Guid getVmTemplateId() {
-        return _vmTemplateId;
+        return vmTemplateId;
     }
 
     private List<Guid> privateStorageDomainsList;


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb042d6cb8276a3c457a94823e90c1e6936cfa69
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to