Bug 1492194 - [3.5] Node affinity alpha feature can cause scheduling failures across the cluster.
Summary: [3.5] Node affinity alpha feature can cause scheduling failures across the cl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.z
Assignee: ravig
QA Contact: Weihua Meng
URL:
Whiteboard:
Depends On: 1483119
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-15 17:47 UTC by Seth Jennings
Modified: 2017-12-07 07:11 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: As of now, pod anti-affinity is respected across projects. Consequence: podA from project1 won't land on node where podB from project2 is running, if pod anti-affinity is enabled when scheduling pod A. Fix: While scheduling podA check for pod anti-affinity only within the project of podA. Result: pod anti-affinity won't be respected across projects.
Clone Of: 1483119
Environment:
Last Closed: 2017-12-07 07:11:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3389 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise security, bug fix, and enhancement update 2017-12-07 12:09:10 UTC

Comment 1 Seth Jennings 2017-09-15 17:49:50 UTC
OSE PR:
https://github.com/openshift/ose/pull/860

Comment 4 Weihua Meng 2017-10-05 12:53:12 UTC
Not fixed in errata version (atomic-openshift-3.5.5.31.27-1.git.0.5d19d76.el7)
  or latest 3.5 (v3.5.5.31.29)

Comment 5 ravig 2017-10-05 14:15:05 UTC
Weiha Meng,

None of those builds have my changes. The PR got merged 6 days ago and I couldn't find a release for 3.5 after that. 

Also, the pod.yaml needs to change for the testing as pod-affinity and anti-affinity are in annotations rather than in pod spec for 3.5.

Comment 6 Seth Jennings 2017-10-05 14:44:20 UTC
Looks like the errata tool may have mistakenly moved this to ON_QA.  Moving back to MODIFIED until it is actually in a build.

Comment 8 Weihua Meng 2017-10-13 01:28:21 UTC
NOT fixed.
openshift v3.5.5.31.34

Comment 9 ravig 2017-10-13 02:15:58 UTC
Can you please share the pod.yaml that was used for testing?

Comment 10 Weihua Meng 2017-10-13 02:18:09 UTC
# cat deployment-sample.yaml 
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
    name: sample1
spec:
  replicas: 2
  template:
    metadata:
      labels:
          app: sample
      annotations:
        scheduler.alpha.kubernetes.io/affinity: >
          {
            "podAntiAffinity": {
              "requiredDuringSchedulingIgnoredDuringExecution": [
                {
                  "labelSelector": {
                    "matchExpressions": [
                      {
                        "key": "app",
                        "operator": "In",
                        "values": ["sample"]
                      }
                    ]
                  },
                  "topologyKey": "kubernetes.io/hostname"
                }
              ]
            }
          }
    spec:
      containers:
      - name: sam
        image: docker.io/ocpqe/hello-pod

Comment 15 ravig 2017-10-13 02:50:19 UTC
Thanks Weihua Meng, I will check this.

Comment 19 Weihua Meng 2017-10-25 05:29:14 UTC
Verified on openshift v3.5.5.31.39
Fixed.

Comment 22 errata-xmlrpc 2017-12-07 07:11:23 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/RHSA-2017:3389


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