Bug 1449908 - ReplicaSet is missing from Overview when deployment is deleted with cascade false
Summary: ReplicaSet is missing from Overview when deployment is deleted with cascade f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: XiaochuanWang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-11 06:53 UTC by XiaochuanWang
Modified: 2017-08-16 19:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When a deployment is deleted using the `--cascade=false` flag oc delete deployment/my-deploymnet --cascade=false the replica sets for that deployment are not deleted. Previously these replica sets were hidden on the web console overview. Now the orphaned replica sets will show up as standalone replica sets on the overview page.
Clone Of:
Environment:
Last Closed: 2017-08-10 05:23:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
When dc is deleted with --cascade=false, the left rc could be displayed well on Overview page. (31.43 KB, image/png)
2017-05-11 06:53 UTC, XiaochuanWang
no flags Details
rs displays on overview (47.56 KB, image/png)
2017-06-05 06:37 UTC, XiaochuanWang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description XiaochuanWang 2017-05-11 06:53:07 UTC
Created attachment 1277758 [details]
When dc is deleted with --cascade=false, the left rc could be displayed well on Overview page.

Description of problem:
Create deployment with replicaSet, then delete deployment by oc(cascade false) and leave with orphaned replicaSet, it's missing from Overview page.

Version-Release number of selected component (if applicable):
Openshift/oc v3.5.5.10

How reproducible:
Always

Steps to Reproduce:
1.Create a Deployment with replicaSets by oc for import from web-console
# cat >> hello-deployment-1.yaml << EOF
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: hello-openshift
spec:
  replicas: 4
  template:
    metadata:
      labels:
        app: hello-openshift
    spec:
      containers:
      - name: hello-openshift
        image: openshift/hello-openshift
        ports:
        - containerPort: 80
  strategy:
    rollingUpdate:
      maxSurge: 3
      maxUnavailable: 2
    type: RollingUpdate
EOF
2. oc get all: existed resources include rs/hello-openshift-2049296760
# oc delete deployment hello-openshift --cascade=false
deployment "hello-openshift" deleted
3. # oc get rs
NAME                         DESIRED   CURRENT   READY     AGE
hello-openshift-2049296760   4         4         4         18m
4. Check Overview page


Actual results:
4. ReplicaSet is missing from Overview page

Expected results:
4. ReplicaSet "hello-openshift-2049296760" should display on Overview

Additional info:
1) A standalone ReplicaSet does not reproduce by:
oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/replicaSet/tc536594/replicaset-with-two-containers.yaml
2) Before deployment is deleted, replicaSet with deployment together only show deployment in Overview.
3) When dc is deleted with --cascade=false, the left rc could be displayed well on Overview page. Eg. $ oc run mydc --image=aosqe/hello-openshift  (wait for the pod running) $ oc delete dc mydc  --cascade=false (refer to screenshot "orphaned_rc.png")

Comment 1 Jessica Forrester 2017-05-11 10:47:53 UTC
I'm guessing it's just because we haven't switched yet to looking at ownerRef to decide if a replicaSet should be shown or rolled up. Unlike with a DC, when a Deployment is deleted the remaining RSes don't have the name of the deployment anymore. So the behavior will still be different, we will have to show all the orphaned RSes.

Comment 3 Jessica Forrester 2017-05-11 14:23:59 UTC
We can't merge the fix for this until the oadm migrate story is complete for ownerRefs

Comment 4 Samuel Padgett 2017-05-17 16:17:25 UTC
Opened a separate PR for only this bug since #1538 is blocked. The new PR is

https://github.com/openshift/origin-web-console/pull/1553

Comment 5 openshift-github-bot 2017-05-18 14:30:40 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/f4abfc21bbb2fda30876b11abd6d60708dbac23b
Bug 1449908 - Group replica sets by owner reference

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1449908

Use owner references to decide if a replica set is owned by a
deployment. Change maps to use deployment UID instead of deployment
name. This avoids problems when a deployment is deleted and another is
created with the same name.

Comment 7 XiaochuanWang 2017-06-05 06:37:49 UTC
Created attachment 1284910 [details]
rs displays on overview

Verified on
OpenShift Master:     v3.6.94
Kubernetes Master:    v1.6.1+5115d708d7 
oc v3.6.94

Please refer to the screenshot "rs displays on overview"

Comment 8 XiaochuanWang 2017-07-17 06:10:27 UTC
QE assign it back

Comment 10 errata-xmlrpc 2017-08-10 05:23:08 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/RHEA-2017:1716


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