Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1603024 - replicaset history did not match with revisionHistoryLimit count
Summary: replicaset history did not match with revisionHistoryLimit count
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.10.z
Assignee: Tomáš Nožička
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-19 02:49 UTC by shahan
Modified: 2018-08-13 12:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-13 12:17:55 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description shahan 2018-07-19 02:49:54 UTC
Description of problem:
 The replicaset will be saved disregard of the count of revisionHistoryLimit

Version-Release number of selected component (if applicable):
 OpenShift Master: v3.10.18 
 Kubernetes Master:v1.10.0+b81c8f8 

How reproducible:
Always

Steps to Reproduce:
1. $ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/hello-deployment-1.yaml
2.  oc patch  deployment hello-openshift -p '{"spec": {"revisionHistoryLimit": 3}}' 
3. change image or other pod template value to generate replicaset to exceed 3 
   oc set image deployment/hello-openshift hello-openshift=openshift/hello-openshift1
4. oc get replicaset 
Actual results:

4. will get 4 replicaset history after 4 times change
 [hasha@mypc ~]$ oc get replicaset
NAME                         DESIRED   CURRENT   READY     AGE
hello-openshift-64bcd68947   0         0         0         19s
hello-openshift-655f97f984   8         8         8         17m
hello-openshift-6f5479cb49   0         0         0         1m
hello-openshift-84595c47c8   5         5         0         4s
hello-openshift-9f8f4cf44    0         0         0         48s


Expected results:
should only save 3 latest replicaset history

Additional info:

Comment 1 Tomáš Nožička 2018-08-13 12:17:55 UTC
Controller cleans the RSs after a deployment is complete, since you are specifying an invalid image you are still in the middle of a rollout. You need to provide a valid image to finish the rollout so the controller is allowed to clean RSs.


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