Bug 1268891 - [3.0.2] pods from the same image in the same service in the same deployment not grouped in another service
[3.0.2] pods from the same image in the same service in the same deployment n...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console (Show other bugs)
3.0.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Jessica Forrester
yapei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-05 10:41 EDT by Erik M Jacobs
Modified: 2015-11-23 09:24 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:24:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
shows ungrouped pods (135.08 KB, image/jpeg)
2015-10-05 10:42 EDT, Erik M Jacobs
no flags Details
correct grouping (133.20 KB, image/png)
2015-10-20 17:13 EDT, Jessica Forrester
no flags Details
incorrect grouping (108.27 KB, image/png)
2015-10-20 17:14 EDT, Jessica Forrester
no flags Details
Correct Grouping (98.49 KB, image/png)
2015-10-23 00:56 EDT, yapei
no flags Details

  None (edit)
Description Erik M Jacobs 2015-10-05 10:41:53 EDT
oc version
oc v3.0.2.0-17-g701346b
kubernetes v1.1.0-alpha.0-1605-g44c91b1

openshift-3.0.2.0-0.git.16.4d626fe.el7ose.x86_64
openshift-master-3.0.2.0-0.git.16.4d626fe.el7ose.x86_64
openshift-node-3.0.2.0-0.git.16.4d626fe.el7ose.x86_64
openshift-sdn-ovs-3.0.2.0-0.git.16.4d626fe.el7ose.x86_64
tuned-profiles-openshift-node-3.0.2.0-0.git.16.4d626fe.el7ose.x86_64

services and dcs:
apiVersion: v1
items:
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-10-05T14:24:05Z
    labels:
      app: blue
    name: ab
    namespace: deploymentscenarios
    resourceVersion: "75250"
    selfLink: /api/v1/namespaces/deploymentscenarios/services/ab
    uid: bb8810f4-6b6c-11e5-b979-525400b33d1d
  spec:
    clusterIP: 172.30.74.127
    portalIP: 172.30.74.127
    ports:
    - name: default
      nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      type: ab
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:23:11Z
    labels:
      app: blue
    name: blue
    namespace: deploymentscenarios
    resourceVersion: "75164"
    selfLink: /api/v1/namespaces/deploymentscenarios/services/blue
    uid: 9bbd5545-6b6c-11e5-b979-525400b33d1d
  spec:
    clusterIP: 172.30.21.59
    portalIP: 172.30.21.59
    ports:
    - nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      deploymentconfig: blue
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:32:18Z
    labels:
      app: green
    name: green
    namespace: deploymentscenarios
    resourceVersion: "75499"
    selfLink: /api/v1/namespaces/deploymentscenarios/services/green
    uid: e1b4f413-6b6d-11e5-b979-525400b33d1d
  spec:
    clusterIP: 172.30.205.105
    portalIP: 172.30.205.105
    ports:
    - nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      deploymentconfig: green
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:23:11Z
    labels:
      app: blue
    name: blue
    namespace: deploymentscenarios
    resourceVersion: "75295"
    selfLink: /oapi/v1/namespaces/deploymentscenarios/deploymentconfigs/blue
    uid: 9bba9908-6b6c-11e5-b979-525400b33d1d
  spec:
    replicas: 1
    selector:
      deploymentconfig: blue
    strategy:
      resources: {}
      rollingParams:
        intervalSeconds: 1
        maxSurge: 25%
        maxUnavailable: 25%
        timeoutSeconds: 600
        updatePeriodSeconds: 1
      type: Rolling
    template:
      metadata:
        creationTimestamp: null
        labels:
          app: blue
          deploymentconfig: blue
          type: ab
      spec:
        containers:
        - image: 172.30.147.87:5000/deploymentscenarios/blue@sha256:97981da1108509d45b596ede398dc1d40ba449654ec4a02a656411f7cb02c3ea
          imagePullPolicy: Always
          name: blue
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - blue
        from:
          kind: ImageStreamTag
          name: blue:latest
        lastTriggeredImage: 172.30.147.87:5000/deploymentscenarios/blue@sha256:97981da1108509d45b596ede398dc1d40ba449654ec4a02a656411f7cb02c3ea
      type: ImageChange
    - type: ConfigChange
  status:
    details:
      causes:
      - type: ConfigChange
    latestVersion: 2
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:32:18Z
    labels:
      app: green
    name: green
    namespace: deploymentscenarios
    resourceVersion: "75651"
    selfLink: /oapi/v1/namespaces/deploymentscenarios/deploymentconfigs/green
    uid: e1b15f85-6b6d-11e5-b979-525400b33d1d
  spec:
    replicas: 1
    selector:
      deploymentconfig: green
    strategy:
      resources: {}
      rollingParams:
        intervalSeconds: 1
        maxSurge: 25%
        maxUnavailable: 25%
        timeoutSeconds: 600
        updatePeriodSeconds: 1
      type: Rolling
    template:
      metadata:
        creationTimestamp: null
        labels:
          app: green
          deploymentconfig: green
          type: ab
      spec:
        containers:
        - image: 172.30.147.87:5000/deploymentscenarios/green@sha256:3ede227d1e037c8f107b238b40c9624c27362ea5b51e5ab919dbed369711cfc5
          imagePullPolicy: Always
          name: green
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - green
        from:
          kind: ImageStreamTag
          name: green:latest
        lastTriggeredImage: 172.30.147.87:5000/deploymentscenarios/green@sha256:3ede227d1e037c8f107b238b40c9624c27362ea5b51e5ab919dbed369711cfc5
      type: ImageChange
    - type: ConfigChange
  status:
    details:
      causes:
      - type: ConfigChange
    latestVersion: 2
kind: List
metadata: {}
Comment 1 Erik M Jacobs 2015-10-05 10:42 EDT
Created attachment 1079991 [details]
shows ungrouped pods
Comment 3 Jessica Forrester 2015-10-05 13:24:18 EDT
The checks in overview in deploymentByService and deployemtConfigsByService are not correct.  They are checking if the selector of the service covers the selector of the deployment/DC, but those selectors may actually be disjoint.  It should be checking if the selector of the service covers the set of labels in the template of the dep/dc, i.e. whether the pods created by the deployments would be covered by the service.
Comment 4 Jessica Forrester 2015-10-19 16:45:10 EDT
https://github.com/openshift/origin/pull/5210
Comment 5 openshift-github-bot 2015-10-19 21:38:53 EDT
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/2944083e6ce5f327eb31c405f743d714a6e76324
Bug 1268891 - pods not always grouped when service selector should cover template of a dc/deployment
Comment 6 yapei 2015-10-20 06:17:32 EDT
(In reply to Erik M Jacobs from comment #1)
> Created attachment 1079991 [details]
> shows ungrouped pods

Could you pls upload a new attachment? There is error when opening the image  'Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)'

it will help us to verify
Comment 7 yapei 2015-10-20 06:59:43 EDT
(In reply to Erik M Jacobs from comment #1)
> Created attachment 1079991 [details]
> shows ungrouped pods

Now I'm not very clear about this issue, really appreciate if you could provide a new valid image file
Comment 8 Erik M Jacobs 2015-10-20 14:32:09 EDT
The image "shows ungrouped pods" works fine for me -- I just downloaded it and was able to look at it.
Comment 9 Jessica Forrester 2015-10-20 17:13 EDT
Created attachment 1084928 [details]
correct grouping
Comment 10 Jessica Forrester 2015-10-20 17:14 EDT
Created attachment 1084929 [details]
incorrect grouping
Comment 11 yapei 2015-10-22 06:25:08 EDT
Verified on 
oc v3.0.2.902
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

the issue is fixed

steps to verify:
1. Create a service(frontend) with two PODs
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json
2. Wait for all pods to be running
3. Check overview page on web console

PODs with same image in the same service in the same deployment are grouped together, displayed as a chart.
Comment 12 Erik M Jacobs 2015-10-22 10:10:38 EDT
can you show a picture for verification?

It doesn't sound like you created a second service like in the original comment.

A service without an associated deployment that has the same pods/images/etc. from a different deployment was what got ungrouped.

Can you show your YAML/JSON?
Comment 13 yapei 2015-10-22 23:37:33 EDT
Jacob, thanks a lot for your reminding.

I verified again with yaml file as follows, I replaced the image

apiVersion: v1
items:
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-10-05T14:24:05Z
    labels:
      app: blue
    name: ab
    namespace: deploymentscenarios
    resourceVersion: "75250"
    selfLink: /api/v1/namespaces/deploymentscenarios/services/ab
    uid: bb8810f4-6b6c-11e5-b979-525400b33d1d
  spec:
    clusterIP: 172.30.74.127
    portalIP: 172.30.74.127
    ports:
    - name: default
      nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      type: ab
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:23:11Z
    labels:
      app: blue
    name: blue
    namespace: deploymentscenarios
    resourceVersion: "75164"
    selfLink: /api/v1/namespaces/deploymentscenarios/services/blue
    uid: 9bbd5545-6b6c-11e5-b979-525400b33d1d
  spec:
    clusterIP: 172.30.21.59
    portalIP: 172.30.21.59
    ports:
    - nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      deploymentconfig: blue
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:32:18Z
    labels:
      app: green
    name: green
    namespace: deploymentscenarios
    resourceVersion: "75499"
    selfLink: /api/v1/namespaces/deploymentscenarios/services/green
    uid: e1b4f413-6b6d-11e5-b979-525400b33d1d
  spec:
    clusterIP: 172.30.205.105
    portalIP: 172.30.205.105
    ports:
    - nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      deploymentconfig: green
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:23:11Z
    labels:
      app: blue
    name: blue
    namespace: deploymentscenarios
    resourceVersion: "75295"
    selfLink: /oapi/v1/namespaces/deploymentscenarios/deploymentconfigs/blue
    uid: 9bba9908-6b6c-11e5-b979-525400b33d1d
  spec:
    replicas: 2
    selector:
      deploymentconfig: blue
    strategy:
      resources: {}
      rollingParams:
        intervalSeconds: 1
        maxSurge: 25%
        maxUnavailable: 25%
        timeoutSeconds: 600
        updatePeriodSeconds: 1
      type: Rolling
    template:
      metadata:
        creationTimestamp: null
        labels:
          app: blue
          deploymentconfig: blue
          type: ab
      spec:
        containers:
        - image: webapp 
          imagePullPolicy: Always
          name: blue
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - blue
        from:
          kind: ImageStreamTag
          name: blue:latest
#        lastTriggeredImage: 172.30.147.87:5000/deploymentscenarios/blue@sha256:97981da1108509d45b596ede398dc1d40ba449654ec4a02a656411f7cb02c3ea
      type: ImageChange
    - type: ConfigChange
  status:
    details:
      causes:
      - type: ConfigChange
    latestVersion: 2
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      openshift.io/generatedby: OpenShiftWebConsole
    creationTimestamp: 2015-10-05T14:32:18Z
    labels:
      app: green
    name: green
    namespace: deploymentscenarios
    resourceVersion: "75651"
    selfLink: /oapi/v1/namespaces/deploymentscenarios/deploymentconfigs/green
    uid: e1b15f85-6b6d-11e5-b979-525400b33d1d
  spec:
    replicas: 2
    selector:
      deploymentconfig: green
    strategy:
      resources: {}
      rollingParams:
        intervalSeconds: 1
        maxSurge: 25%
        maxUnavailable: 25%
        timeoutSeconds: 600
        updatePeriodSeconds: 1
      type: Rolling
    template:
      metadata:
        creationTimestamp: null
        labels:
          app: green
          deploymentconfig: green
          type: ab
      spec:
        containers:
        - image: busybox
          imagePullPolicy: Always
          name: green
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - green
        from:
          kind: ImageStreamTag
          name: green:latest
#        lastTriggeredImage: 172.30.147.87:5000/deploymentscenarios/green@sha256:3ede227d1e037c8f107b238b40c9624c27362ea5b51e5ab919dbed369711cfc5
      type: ImageChange
    - type: ConfigChange
  status:
    details:
      causes:
      - type: ConfigChange
    latestVersion: 2
kind: List
metadata: {}
Comment 14 yapei 2015-10-23 00:56 EDT
Created attachment 1085702 [details]
Correct Grouping
Comment 15 yapei 2015-10-23 01:05:42 EDT
the two pods matches service ab's selector was grouped in a deployment other than standalone pods
Comment 16 Erik M Jacobs 2015-10-23 09:30:20 EDT
I guess that looks right!
Comment 17 Brenton Leanhardt 2015-11-23 09:24:22 EST
This fix is available in OpenShift Enterprise 3.1.

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