Martin Sivák has posted comments on this change. Change subject: core: adding HA score with proper scheduling policies ......................................................................
Patch Set 2: Code-Review-1 (2 comments) I think there is an error in the logic of HAClusterFilterPolicyUnit. Your code will set the error when any hosts was filtered out, but the message says that no hosts are available. And even if you really want it like that, the boolean is not necessary, just compare the sizes of the two Lists. Also the naming will be confusing for an user as the HA cluster policy only applies to hosted engine VMs. So I would suggest renaming the necessary symbols to HostedEngine(HA) or something similar. The HA score itself can probably stay as it is, but please document the attribute in VdsDynamic and describe what it is for and what values will be there and who provides them. People will forget and consider it to be part of the high availability scheduling we have for standard VMs otherwise. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/HAClusterFilterPolicyUnit.java Line 33: log.debugFormat("Host {0} was filtered out as it doesn't have a positive score", host.getName()); Line 34: } Line 35: } Line 36: Line 37: if (filteredOutHosts) { Are you sure about this? Wouldn't hostsToRunOn.size() == 0 be better condition? Line 38: messages.add(VdcBllMessages.ACTION_TYPE_FAILED_NO_HA_VDS.toString()); Line 39: } Line 40: Line 41: return hostsToRunOn; .................................................... File packaging/dbscripts/upgrade/03_03_0990_add_ha_policy_units.sql Line 1: 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 there HA score'); their 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); Line 6: INSERT INTO cluster_policy_units (cluster_policy_id, policy_unit_id, filter_sequence, factor) VALUES ('5a2b0939-7d46-4b73-a469-e9c2c7fc6a53', 'e659c871-0bf1-4ccc-b748-f28f5d08dffd', 0, 0); Line 7: INSERT INTO cluster_policy_units (cluster_policy_id, policy_unit_id, filter_sequence, factor) VALUES ('b4ed2332-a7ac-4d5f-9596-99a439cb2812', '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: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@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: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches