Martin Sivák has posted comments on this change.

Change subject: PendingResourceManager for tracking resources in WaitForLaunch
......................................................................


Patch Set 6:

(4 comments)

https://gerrit.ovirt.org/#/c/40136/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java:

Line 283
Line 284
Line 285
Line 286
Line 287
> I see that you remove the mechanism that prevents redundant decreases by th
Yes, the redundant decrease has no effect anymore. When the record is deleted 
from the manager, it stays deleted even when you delete it for the second time.


https://gerrit.ovirt.org/#/c/40136/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/AbstractPendingResource.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/AbstractPendingResource.java:

Line 15: public abstract class AbstractPendingResource {
Line 16:     protected VDS host;
Line 17:     protected VM vm;
Line 18: 
Line 19:     public AbstractPendingResource(Guid host, VM vm) {
> Is this really necessary? Wouldn't it be cleaner to have only AbstractPendi
This abstracts the scheduler from having to create the VDS object on couple of 
places, because we only use Guids during certain scheduling stages.

We can do it manually there, but I thought it will be more readable this way.
Line 20:         this.host = new VDS();
Line 21:         this.host.setId(host);
Line 22:         this.vm = vm;
Line 23:     }


https://gerrit.ovirt.org/#/c/40136/6/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java:

Line 1183:     public void setFenceAgents(List<FenceAgent> fenceAgents) {
Line 1184:         this.fenceAgents = fenceAgents;
Line 1185:     }
Line 1186: 
Line 1187:     public void calculateFreeVirtualMemory() {
> IMO this method doesn't belong to entity object. It should be moved into so
I agree, I just was not sure where the right place is. We need the value both 
in REST and UI.
Line 1188:         if (getMemCommited() != null && getPhysicalMemMb() != null 
&& getReservedMem() != null) {
Line 1189:             maxSchedulingMemory = (getMaxVdsMemoryOverCommit() * 
getPhysicalMemMb() / 100.0f)
Line 1190:                     - getMemCommited()
Line 1191:                     - getReservedMem()


https://gerrit.ovirt.org/#/c/40136/6/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAO.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAO.java:

Line 27:      * @param pendingVmemSize - a new value will be 
GREATEST(pending_vmem_size + pendingVmemSize, 0)
Line 28:      * @param memCommited - will decrease or increase value of 
mem_commited by ABS(memCommited) + guest_overhead
Line 29:      * @param vmsCoresCount - a new value will be 
GREATEST(vms_cores_count + v_vmsCoresCount, 0)
Line 30:      */
Line 31:     void updatePartialVdsDynamicCalc(Guid id, int vmCount, int 
pendingVcpusCount, int pendingVmemSize, int memCommited, int vmsCoresCount);
> why keeping it as deprecated and not removing it?
The plan is to kill it totally. I just wanted to make the draft focus on the 
architecture and not fill it with all the needed refactoring.
Line 32: 
Line 33:     /**
Line 34:      * This method will update the controlled_by_pm_policy flag in DB.
Line 35:      * @param id - id or record to be updated


-- 
To view, visit https://gerrit.ovirt.org/40136
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie741b8e244acb64e470af83252d90ec134ba7f8e
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Tomer Saban <tsa...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to