Bug 1529473

Summary: `oc idle` fails to work for endpoints to rc/rs/deploy
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Solly Ross <sross>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: high Docs Contact:
Priority: high    
Version: 3.9.0CC: aos-bugs, bmeng, dma, jliggitt, jokerman, mmccomas, sjenning, wjiang
Target Milestone: ---Keywords: Regression, TestBlocker
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 14:17:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1519991    

Description Xingxing Xia 2017-12-28 09:27:51 UTC
Description of problem:
`oc idle` fails to work for endpoints to rc/rs/deploy and shows message "unable to find controller for pod"
It can work for dc

Version-Release number of selected component (if applicable):
v3.9.0-0.9.0

How reproducible:
Always

Steps to Reproduce:
1.
Create rc and svc
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/rc/idle-rc-1.yaml
replicationcontroller "hello-idle" created
service "hello-idle" created

After pod becomes running, run `oc idle`
$ oc idle hello-idle

2. Create rs and svc
$ vi rs.yaml
apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
  labels:
    tier: frontend
  name: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      tier: frontend
  template:
    metadata:
      labels:
        tier: frontend
    spec:
      containers:
      - image: openshift/hello-openshift
        name: hello-openshift
        ports:
        - containerPort: 8080
          protocol: TCP

$ oc create -f rs.yaml
$ oc expose rs/frontend

After pod becomes running, run `oc idle`
$ oc idle frontend

3. Create deployment and svc
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/tc536600/hello-deployment-1.yaml
$ oc expose deploy/hello-openshift

After pod becomes running, run `oc idle`
$ oc idle hello-openshift

Actual results:
`oc idle` fails to work for endpoints to rc/rs/deploy and shows message like:
error: no valid scalable resources found to idle: unable to calculate scalable resources for service xxia-proj/hello-idle: unable to find controller for pod xxia-proj/hello-idle-24mn8: no creator reference listed

Expected results:
`oc idle` should succeed

Additional info:

Comment 1 DeShuai Ma 2018-01-16 08:01:28 UTC
The `kubernetes.io/created-by` annotation is removed in 1.9, upstream pr: https://github.com/kubernetes/kubernetes/pull/54445
it switch to ownerReferences in pod metadata

Comment 2 Meng Bo 2018-01-17 07:13:06 UTC
The bug is blocking the idle related feature testing.

Comment 3 Jordan Liggitt 2018-01-17 15:47:43 UTC
see https://github.com/openshift/origin/issues/17798

Comment 4 Seth Jennings 2018-01-17 21:02:36 UTC
Origin PR:
https://github.com/openshift/origin/pull/18147

Comment 6 Xingxing Xia 2018-01-23 05:10:35 UTC
Tested in v3.9.0-0.22.0, now `oc idle` can idle dc and rc/rs/deploy as well

Comment 9 errata-xmlrpc 2018-03-28 14:17:25 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/RHBA-2018:0489