Gilad Chaplik has posted comments on this change.

Change subject: core: adding HA score with proper scheduling policies
......................................................................


Patch Set 4: Code-Review+1

(5 comments)

looks good, minor comments.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HostedEngineHAClusterFilterPolicyUnit.java
Line 22:         if (vm.isHostedEngine()) {
Line 23: 
Line 24:             List<VDS> hostsToRunOn = new ArrayList<VDS>();
Line 25:             for (VDS host : hosts) {
Line 26:                 int haScore = 
host.getDynamicData().getHighlyAvailableScore();
use host.getHighlyAvailableScore()
Line 27:                 if (haScore > 0) {
Line 28:                     hostsToRunOn.add(host);
Line 29:                     log.debugFormat("Host {0} wasn't filtered out as 
it has a score of {1}",
Line 30:                             host.getName(),


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HostedEngineHAClusterWeightPolicyUnit.java
Line 17:     public HostedEngineHAClusterWeightPolicyUnit(PolicyUnit 
policyUnit) {
Line 18:         super(policyUnit);
Line 19:     }
Line 20: 
Line 21:     Integer calcNormalizedHaScore(VDS vds) {
you can return int, and declare as private/protected.
Line 22:         return MaxSchedulerWeight - 
vds.getDynamicData().getHighlyAvailableScore();
Line 23:     }
Line 24: 
Line 25:     @Override


Line 18:         super(policyUnit);
Line 19:     }
Line 20: 
Line 21:     Integer calcNormalizedHaScore(VDS vds) {
Line 22:         return MaxSchedulerWeight - 
vds.getDynamicData().getHighlyAvailableScore();
use vds.getHighlyAvailableScore()
Line 23:     }
Line 24: 
Line 25:     @Override
Line 26:     public List<Pair<Guid, Integer>> score(List<VDS> hosts, VM vm, 
Map<String, String> parameters) {


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
Line 1567: 
Line 1568:                 if (StringUtils.equals(HOSTED_ENGINE_VM_NAME, 
vmNameOnHost)) {
Line 1569:                     vmStatic.setName(vmNameOnHost);
Line 1570:                     vmStatic.setOrigin(OriginType.HOSTED_ENGINE);
Line 1571:                     
vmStatic.setMigrationSupport(MigrationSupport.IMPLICITLY_NON_MIGRATABLE);
Consider blocking updating migration support in updateVm CDA.
Line 1572:                 } else {
Line 1573:                     
vmStatic.setName(String.format(EXTERNAL_VM_NAME_FORMAT, vmNameOnHost));
Line 1574:                     vmStatic.setOrigin(OriginType.EXTERNAL);
Line 1575:                 }


....................................................
File packaging/dbscripts/upgrade/03_03_0990_add_ha_policy_units.sql
Line 1: 
consider merging both of the update scripts. it would be easier to work with 
the patch.
Line 2: INSERT INTO policy_units (id, name, is_internal, 
custom_properties_regex, type, enabled, description) VALUES 
('e659c871-0bf1-4ccc-b748-f28f5d08dffd', 'HA', true, NULL, 0, true, 'Runs the 
hosted engine VM only on hosts with a positive score');
Line 3: INSERT INTO policy_units (id, name, is_internal, 
custom_properties_regex, type, enabled, description) VALUES 
('98e92667-6161-41fb-b3fa-34f820ccbc4b', 'HA', true, NULL, 1, true, 'Weights 
hosts according to their HA score');
Line 4: 
Line 5: INSERT INTO cluster_policy_units (cluster_policy_id, policy_unit_id, 
filter_sequence, factor) VALUES ('20d25257-b4bd-4589-92a6-c4c5c5d3fd1a', 
'e659c871-0bf1-4ccc-b748-f28f5d08dffd', 0, 0);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I24879ed64cab829969556fd71786b32d3aaaf0c7
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
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