Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1688674 - Scheduler priority "ImageLocalityPriority" not take effect
Summary: Scheduler priority "ImageLocalityPriority" not take effect
Status: CLOSED DUPLICATE of bug 1685439
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod
Version: 4.1
Hardware: x86_64
OS: Linux
Target Milestone: ---
: 4.1.0
Assignee: ravig
QA Contact: Jianwei Hou
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-14 08:22 UTC by MinLi
Modified: 2019-03-20 15:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-03-20 15:32:07 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description MinLi 2019-03-14 08:22:14 UTC
Description of problem:
When create configmap and scheduler for policy priority "ImageLocalityPriority", it not take effect. It means a pod is not scheduled to a node which has image digest locally but to a node which need to pull image from registry.

Version-Release number of selected component (if applicable):
oc v4.0.0-0.182.0

How reproducible:

Steps to Reproduce:
1.#oc create configmap -n openshift-config --from-file=policy.cfg mypolicy
policy.cfg is like:
"kind" : "Policy",
"apiVersion" : "v1",
"priorities" : [
        {"name" : "ImageLocalityPriority", "weight" : 100}

2.#oc create -f scheduler.yaml
scheduler.yaml is like:
kind: Scheduler
  name: cluster
    name: mypolicy

3.Pull image with digest in node1
#sudo crictl pull

4.Make sure only node1 has this image digest
#oc get node $nodeName -o json | grep

5.Create a pod with this image digest.
#oc create -f pod.json -n minmli
pod.json is like:
  "kind": "Pod",  
  "apiVersion": "v1",  
  "metadata": {  
    "name": "hello-openshift",  
    "creationTimestamp": null,  
    "labels": {  
      "name": "hello-openshift"  
  "spec": {  
    "containers": [  
        "name": "hello-openshift",  
**        "image": "",**  
        "ports": [  
            "containerPort": 8080,  
            "protocol": "TCP"  
        "resources": {},  
        "volumeMounts": [  
        "terminationMessagePath": "/dev/termination-log",  
        "imagePullPolicy": "IfNotPresent",  
        "capabilities": {},  
        "securityContext": {  
          "capabilities": {},  
          "privileged": false  
    "volumes": [  
        "emptyDir": {}  
    "restartPolicy": "Always",  
    "dnsPolicy": "ClusterFirst",  
    "serviceAccount": ""  
  "status": {}  

Actual results:
5.the pod is not scheduled to node1, but node2 which need to pull image first. 

Expected results:
5.the pod is scheduled to node1

Additional info:
I think there should be some log in openshift-kube-scheduler pod, but I find nothing related, perhaps we should add some schedule log or maybe I don't choose correct log-level.

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