Change in ovirt-engine[master]: PendingResourceManager for tracking resources in WaitForLaunch
rgolan at redhat.com
rgolan at redhat.com
Tue Jun 2 08:49:36 UTC 2015
Roy Golan has submitted this change and it was merged.
Change subject: PendingResourceManager for tracking resources in WaitForLaunch
......................................................................
PendingResourceManager for tracking resources in WaitForLaunch
This patch adds a new scheduler component PendingResourceManager.
This manager is responsible for keeping track of all resources
that are allocated by not-yet running VMs. Each resource type
is represented by its own class type (and values) and can compute
summary information about pending counts/sizes per host.
This should allow us to easily track multiple resources we lack
today - VMs themselves (for affinity or PCI passthrough), VNICs
and others.
The benefit of this patch is that multiple calls to PRM.cleanVm()
do not cause the counters to be decremented multiple times. The
manager tracks all pending resources separately and has indexes
for per VM and per Host access.
The old VDS fields for pending memory and CPU are left in the
entity for cache purposes. Reading them does not guarantee
validity though. Only SchedulingManager's instance of PRM
guaranteed up-to-date and valid values.
The only procedure which is allowed to put those to DB is the
VdsManager via PendingResourceManager. VdsManager has a new call
updatePendingData to receive the current pending values from PRM.
Change-Id: Ie741b8e244acb64e470af83252d90ec134ba7f8e
Signed-off-by: Martin Sivak <msivak at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/HaReservationHandling.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/PolicyUnitImpl.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/PendingCpuCores.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/PendingMemory.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/PendingResource.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/PendingResourceManager.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/PendingVM.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CPUPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuAndMemoryBalancingPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuLevelFilterPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/EmulatedMachineFilterPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/EvenDistributionBalancePolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/EvenDistributionWeightPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/EvenGuestDistributionBalancePolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/EvenGuestDistributionWeightPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationBalancePolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HaReservationWeightPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HostedEngineHAClusterFilterPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HostedEngineHAClusterWeightPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/MemoryPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/MigrationPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/NetworkPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/NoneBalancePolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/NoneWeightPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PowerSavingBalancePolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PowerSavingWeightPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/VmAffinityFilterPolicyUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/VmAffinityWeightPolicyUnit.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/SlaValidatorTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/pending/PendingResourceManagerTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuAndMemoryBalancingPolicyUnitTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAO.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAODbFacadeImpl.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VdsDynamicDAOTest.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/HostMapperTest.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
43 files changed, 842 insertions(+), 186 deletions(-)
Approvals:
Martin Sivák: Verified
Roy Golan: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/40136
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie741b8e244acb64e470af83252d90ec134ba7f8e
Gerrit-PatchSet: 21
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tomer Saban <tsaban at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
More information about the Engine-commits
mailing list