Bug 1322205

Summary: Failed to scale up deployment by the latest active RC
Product: OKD Reporter: zhou ying <yinzhou>
Component: DeploymentsAssignee: Michail Kargakis <mkargaki>
Status: CLOSED CURRENTRELEASE QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, maszulik, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 17:10:13 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 zhou ying 2016-03-30 02:16:30 UTC
Description of problem:
When the latest deployment failed , try to scale the latest active deployment with the RC, the scale didn't take effort.

Version-Release number of selected component (if applicable):
openshift v1.1.4-296-g8e98dcc
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

How reproducible:
always

Steps to Reproduce:
1. Login OpenShift and create project;
2. Create a depoymentconfig;
3. When the first deployment completed, start the second deployment, when the second deployment running cancel it ;
4. Wait the latest deployment failed and auto rollback to the active deployment;
5. Try to scale up the latest active deployment by RC:
[root@ip-172-18-14-157 amd64]# oc get rc
NAME         DESIRED   CURRENT   AGE
database-1   1         1         2h
frontend-1   0         0         2h
frontend-2   2         2         2h
frontend-3   0         0         2h
[root@ip-172-18-14-157 amd64]# oc scale rc frontend-2 --replicas=3
replicationcontroller "frontend-2" scaled

Actual results:
5. Failed to scale up the latest active deployment
[root@ip-172-18-14-157 amd64]# oc get pods
NAME                        READY     STATUS             RESTARTS   AGE
database-1-utaec            1/1       Running            0          2h
frontend-2-5j3ol            1/1       Running            0          2h
frontend-2-rxmr7            1/1       Running            0          2h
frontend-2-tt3ku            1/1       Running            0          3s
frontend-3-deploy           0/1       DeadlineExceeded   0          2h
frontend-3-hook-pre         0/1       DeadlineExceeded   0          2h


[root@ip-172-18-14-157 amd64]# oc get dc frontend -o json |grep replicas
        "replicas": 2,
[root@ip-172-18-14-157 amd64]# oc get pods
NAME                        READY     STATUS             RESTARTS   AGE
database-1-utaec            1/1       Running            0          2h
frontend-2-5j3ol            1/1       Running            0          2h
frontend-2-rxmr7            1/1       Running            0          2h
frontend-3-deploy           0/1       DeadlineExceeded   0          2h
frontend-3-hook-pre         0/1       DeadlineExceeded   0          2h

Expected results:
5. Should be able to scale up the active deployment.

Additional info:

Comment 1 Michail Kargakis 2016-03-30 12:07:08 UTC
In order to scale the active deployment, you need to scale the dc and not the rc.
Try oc dc/frontend --replicas 3, otherwise the replica amount won't be persisted. 

As a general rule, users shouldn't touch rcs for dcs.

Comment 2 zhou ying 2016-03-31 02:52:09 UTC
Confirmed on :
openshift v3.2.0.8
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5