Bug 1322154

Summary: Configure scheduler.json options in installer
Product: OpenShift Container Platform Reporter: Stefanie Forrester <dakini>
Component: InstallerAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED ERRATA QA Contact: Ma xiaoqiang <xiama>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: aos-bugs, jialiu, jokerman, mmccomas, tdawson, xtian
Target Milestone: ---Keywords: NeedsTestCase
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 16:39:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Stefanie Forrester 2016-03-29 22:28:50 UTC
Description of problem:

For OpenShift Online, we're going to need to set the following in /etc/origin/master/scheduler.json:

    {
      "kind": "Policy",
      "apiVersion": "v1",
      "predicates": [
        {"name": "MatchNodeSelector"},
        {"name": "PodFitsResources"},
        {"name": "PodFitsPorts"},
        {"name": "NoDiskConflict"},
        {"name" : "MaxEBSVolumeCount"}
      ],"priorities": [
        {"name": "LeastRequestedPriority", "weight": 1},
        {"name": "ServiceSpreadingPriority", "weight": 1}
      ]
    }

It would be ideal to have some installer options to set these variables. Related github issue is here https://github.com/openshift/online/issues/77

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jason DeTiberus 2016-03-30 02:37:57 UTC
openshift-ansible PR: https://github.com/openshift/openshift-ansible/pull/1680

To override the scheduler as needed, the following variables can be set in the inventory:
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}]

if defining in yaml format, it can be done in the following (much more readable way):
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 2 Troy Dawson 2016-04-04 16:19:59 UTC
This is in openshift-ansible-3.0.70-1.git.0.3f80411.el7 which is built and available in the latest puddles.

Comment 3 Ma xiaoqiang 2016-04-05 09:11:29 UTC
check on openshift-ansible-3.0.71-1.git.0.63af28f.el7.noarch

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:39:40 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