Bug 1370434

Summary: Should remove the idle annotations when user scaled up an idled rc manually
Product: OpenShift Container Platform Reporter: Meng Bo <bmeng>
Component: NodeAssignee: Seth Jennings <sjenning>
Status: CLOSED WONTFIX QA Contact: Xiaoli Tian <xtian>
Severity: low Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, gblomqui, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
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: 2019-07-03 15:25:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Meng Bo 2016-08-26 10:23:32 UTC
Description of problem:
After idling the service, the idle related annotation will be added to the rc. When scaling up the rc manually, the annotations will be still there. But does nothing unless the user scales down the rc to 0 again.
We should treat the manually scaled up rc not as idled.

Version-Release number of selected component (if applicable):
openshift v3.3.0.25+d2ac65e-dirty
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

How reproducible:
always

Steps to Reproduce:
1. Create rc/svc
oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/networking/list_for_pods.json
2. Idle the service 
oc idle test-service
3. Scale up the rc manually
oc scale rc test-rc --replicas=2
4. Check the rc resource 
oc get rc test-rc -o yaml
5. Delete the pods 

Actual results:
4. The idled related annotation are still there.
$ oc get rc test-rc -oyaml
apiVersion: v1
kind: ReplicationController
metadata:
  annotations:
    idling.alpha.openshift.io/idled-at: 2016-08-26T08:21:02Z
    idling.alpha.openshift.io/previous-scale: "2"
  creationTimestamp: 2016-08-26T08:14:12Z
  generation: 7
  labels:
    name: test-rc
  name: test-rc
  namespace: u1p1
  resourceVersion: "84037"
  selfLink: /api/v1/namespaces/u1p1/replicationcontrollers/test-rc
  uid: 127903ec-6b65-11e6-924c-525400dd3698
spec:
  replicas: 1
  selector:
    name: test-pods
  template:
    metadata:
      creationTimestamp: null
      labels:
        name: test-pods
    spec:
      containers:
      - image: bmeng/hello-openshift
        imagePullPolicy: Always
        name: test-pod
        resources: {}
        terminationMessagePath: /dev/termination-log
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
      terminationGracePeriodSeconds: 30
status:
  fullyLabeledReplicas: 1
  observedGeneration: 7
  replicas: 1

5. The pods will be re-created after deleted.

Expected results:
Should remove the annotations since the rc is actually not idled anymore.

Additional info:

Comment 3 Greg Blomquist 2019-07-03 15:25:29 UTC
No activity in 3 years on a low severity bug.