Bug 1529473 - `oc idle` fails to work for endpoints to rc/rs/deploy
Summary: `oc idle` fails to work for endpoints to rc/rs/deploy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.9.0
Assignee: Solly Ross
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks: 1519991
TreeView+ depends on / blocked
 
Reported: 2017-12-28 09:27 UTC by Xingxing Xia
Modified: 2018-03-28 14:17 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-28 14:17:25 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 14:17:57 UTC

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


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