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.
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.
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}]
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.
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