Bug 1312065 - Installer should allow for customization of the Scheduler Policy.
Installer should allow for customization of the Scheduler Policy.
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.1.0
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jason DeTiberus
Ma xiaoqiang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-25 11:22 EST by Eric Sauer
Modified: 2016-07-03 20:46 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 12:38:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Sauer 2016-02-25 11:22:13 EST
Description of problem:
Many customer's aren't comfortable with, or would like to make adjustments to, the default node labels 'region' and 'zone'. Currently we can set whatever custom labels we would like to on the nodes at install time. However, in order to change the label names in the Scheduler policy, we have to directly edit `/etc/origin/master/scheduler.json` post install. In multi-master setups this becomes a config management problem. It would be nice to be able to define a custom Policy at install time the way we can currently do with Auth Providers.
Comment 1 Jason DeTiberus 2016-02-26 11:22:58 EST
For the first iteration of this support, I would suggest that we just take a json encoded string provided in the host inventory, do some minimal validation on it and provide it in place of the default scheduler config we currently configure.

In the future we may want to provide a cleaner way to represent the scheduler config to the user for modification.
Comment 2 Jason DeTiberus 2016-04-04 17:19:22 EDT
The PR for this has now been merged: https://github.com/openshift/openshift-ansible/pull/1680

The priorities and predicates can be specified in the inventory file as follows:
openshift_master_scheduler_predicates=[{"name": "MatchNodeSelector"}, {"name": "PodFitsResources"}, {"name": "PodFitsPorts"}, {"name": "NoDiskConflict"}, {"name" : "MaxEBSVolumeCount"}]
openshift_master_scheduler_priorities=[{"name": "LeastRequestedPriority", "weight": 1}, {"name": "ServiceSpreadingPriority", "weight": 1}]
Comment 3 Ma xiaoqiang 2016-04-05 05:12:03 EDT
check on openshift-ansible -b master

scenarios 1:
Install env without 'openshift_master_scheduler_predicates' and 'openshift_master_scheduler_priorities'

check the configuration file, compare with the configuration from template,
the "ServiceSpreadingPriority" is changed to 'SelectorSpreadPriority', is it by design?


scenarios 2:
Install ha-master env with 'openshift_master_scheduler_predicates' and 'openshift_master_scheduler_priorities'
<--snip-->
openshift_master_scheduler_predicates=[{"name": "MatchNodeSelector"}, {"name": "PodFitsResources"}, {"name": "PodFitsPorts"}, {"name": "NoDiskConflict"}, {"name" : "MaxEBSVolumeCount"}]
openshift_master_scheduler_priorities=[{"name": "LeastRequestedPriority", "weight": 1}, {"name": "ServiceSpreadingPriority", "weight": 1}]
<--snip-->

check the configuration file after installation, the specified value take effect.

Move this issue to VERIFIED.
Comment 5 errata-xmlrpc 2016-05-12 12:38:20 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1065

Note You need to log in before you can comment on or make changes to this bug.