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")
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.
https://github.com/openshift/origin-web-console/pull/1538
We can't merge the fix for this until the oadm migrate story is complete for ownerRefs
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
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.
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"
QE assign it back
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