Why do I get 'couldn't create scheduler from policy' after applying a custom scheduler policy?
Issue
- Changes to
schedulers.config.openshift.io
are not processed and thekube-scheduler
ClusterOperator
is degraded. -
After applying the custom scheduler policy,
kube-scheduler
status message in the WebGUI or CLI shows an error:$ oc describe ClusterOperator kube-scheduler NodeInstallerDegraded: 1 nodes are failing on revision 42: NodeInstallerDegraded: StaticPodsDegraded: nodes/ip-ip-10-0-0-1.example.com pods/openshift-kube-scheduler-ip-10-0-0-1.example.com container="kube-scheduler" is not ready StaticPodsDegraded: nodes/ip-ip-10-0-0-1.example.com pods/openshift-kube-scheduler-ip-10-0-0-1.example.com container="kube-scheduler" is waiting: "CrashLoopBackOff" - "back-off 5m0s restarting failed container=kube-scheduler
-
The affected pod of the
kube-scheduler
which is in theCrashLoopBackOff
state is logging errors like:I0603 15:06:20.213665 1 factory.go:137] Creating scheduler from configuration: {{ } [{NoVolumeZoneConflict <nil>} {MatchNodeSelector <nil>} {MaxEBSVolumeCount <nil>} {MaxGCEPDVolumeCount <nil>} {MaxAzureDiskVolumeCount <nil>} {MatchInterPodAffinity <nil>} {NoDiskConflict <nil>} {GeneralPredicates <nil>} {PodToleratesNodeTaints <nil>} {CheckVolumeBinding <nil>} {Region 0xc0002f6d70}] [{SelectorSpreadPriority 12 <nil>} {InterPodAffinityPriority 12 <nil>} {MostRequestedPriority 3 <nil>} {BalancedResourceAllocation 12 <nil>} {NodePreferAvoidPodsPriority 120000 <nil>} {NodeAffinityPriority 12 <nil>} {TaintTolerationPriority 12 <nil>} {Zone 24 0xc000282180} {PriorityA 12 0xc0002821a0} {PriorityB 10 0xc000282200} {PriorityC 8 0xc000282a20} {PriorityD 6 0xc000282a60} {PriorityE 4 0xc000282aa0}] [] 0 false} couldn't create scheduler from policy: [LabelPreference priority "PriorityB" has a different weight with "PriorityA", LabelPreference priority "PriorityC" has a different weight with "PriorityA", LabelPreference priority "PriorityD" has a different weight with "PriorityA", LabelPreference priority "PriorityE" has a different weight with "PriorityA"]
Environment
- Red Hat OpenShift Container Platform (OCP) 4.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.