Liron Aravot has posted comments on this change. Change subject: core: OvfDataUpdater - removal of update/remove OVF vdsm calls ......................................................................
Patch Set 20: (11 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java Line 939 Line 940 Line 941 Line 942 Line 943 there's no need to update in that case, ovf updater performs that automatically for added vms. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java Line 397 Line 398 Line 399 Line 400 Line 401 as we insert new record to vm_static, ovf updater will detect that automatically. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java Line 177: Line 178: } Line 179: Line 180: protected void incrementDbGeneration() { Line 181: getVmStaticDAO().incrementDbGeneration(getVm().getId()); thanks, added override annotation.. Line 182: } Line 183: Line 184: @Override Line 185: protected void moveOrCopyAllImageGroups() { .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java Line 314: private void endCommand() { Line 315: List<VM> listVms = getVmsForDiskId(); Line 316: for (VM vm : listVms) { Line 317: getVmStaticDAO().incrementDbGeneration(vm.getId()); Line 318: } in order to prevent possible db deadlocks, i want the increment operation to be first in each transaction. Line 319: Backend.getInstance().EndAction(VdcActionType.RemoveImage, getParameters().getImagesParameters().get(0)); Line 320: setSucceeded(true); Line 321: } Line 322: .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java Line 68 Line 69 Line 70 Line 71 Line 72 yep .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java Line 79: Line 80: @Override Line 81: protected void executeCommand() { Line 82: if (getVmTemplate() != null) { Line 83: getVmStaticDAO().incrementDbGeneration(getVmTemplate().getId()); it's checked in the canDoAction, and if blank template edits would be allowed, then we should have it's ovf as well. Line 84: UpdateVmTemplate(); Line 85: setSucceeded(true); Line 86: } Line 87: } .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java Line 79: "auto_startup", Line 80: "dedicated_vm_for_vds", "default_display_type", "priority", "default_boot_sequence", "initrd_url", Line 81: "kernel_url", "kernel_params", "migrationSupport", "minAllocatedMem", "quotaId", "quotaName", Line 82: "quotaEnforcementType", "cpuPinning", Line 83: "vmPayload", "balloonEnabled", "smartcardEnabled","deleteProtected","db_generation", Done Line 84: "images", // images list is relational entity - ignore value changes Line 85: "interfaces" // interfaces is relational entity - ignore value changes Line 86: }); Line 87: mUpdateVmsStatic.AddFields( .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java Line 16: import org.ovirt.engine.core.utils.transaction.TransactionSupport; Line 17: Line 18: public class VmTemplateHandler { Line 19: public static Guid BlankVmTemplateId = new Guid(); Line 20: public static String BlankVmTemplateName = "Blank"; check in ovfdataupdater , will move to the first patch..thaks! Line 21: public static ObjectIdentityChecker mUpdateVmTemplate; Line 22: Line 23: /** Line 24: * Initialize static list containers, for identity and permission check. The initialization should be executed .................................................... Commit Message Line 11: given vm/template has been updated. Line 12: Line 13: Generally, most commands are performed under lock to a specific Line 14: vm/template, but not all of them - as the row which contains the db Line 15: generation of a vm/template is Done Line 16: accessed from many commands that perform operation on it , the update Line 17: statement to this row has been placed in the start of the db update Line 18: transaction in order to avoid possible db deadlocks and errors . Line 19: Line 14: vm/template, but not all of them - as the row which contains the db Line 15: generation of a vm/template is Line 16: accessed from many commands that perform operation on it , the update Line 17: statement to this row has been placed in the start of the db update Line 18: transaction in order to avoid possible db deadlocks and errors . Done Line 19: Line 20: Change-Id: Iedebceb9809dc0b11c0bbe8a2d4af63b0d848df1 Line 15: generation of a vm/template is Line 16: accessed from many commands that perform operation on it , the update Line 17: statement to this row has been placed in the start of the db update Line 18: transaction in order to avoid possible db deadlocks and errors . Line 19: Done Line 20: Change-Id: Iedebceb9809dc0b11c0bbe8a2d4af63b0d848df1 -- To view, visit http://gerrit.ovirt.org/9340 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedebceb9809dc0b11c0bbe8a2d4af63b0d848df1 Gerrit-PatchSet: 20 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches