Bug 1312065 - Installer should allow for customization of the Scheduler Policy.
Summary: Installer should allow for customization of the Scheduler Policy.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.1.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: Ma xiaoqiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-25 16:22 UTC by Eric Sauer
Modified: 2016-07-04 00:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 16:38:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1065 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-05-12 20:32:56 UTC

Description Eric Sauer 2016-02-25 16:22:13 UTC
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 16:22:58 UTC
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 21:19:22 UTC
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 09:12:03 UTC
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 16:38:20 UTC
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.