Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1333129 - Cannot scale up a pod while a deployment is not completed
Cannot scale up a pod while a deployment is not completed
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Deployments (Show other bugs)
3.2.1
Unspecified Unspecified
medium Severity medium
: ---
: 3.2.1
Assigned To: Michail Kargakis
zhou ying
:
: 1306720 1353834 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-04 13:38 EDT by Cesar Wong
Modified: 2016-09-27 05:32 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-27 05:32:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
scale request (314.34 KB, image/png)
2016-05-04 13:38 EDT, Cesar Wong
no flags Details
event log (246.06 KB, image/png)
2016-05-04 14:42 EDT, Cesar Wong
no flags Details
scaling (2.83 MB, image/jpeg)
2016-05-30 23:52 EDT, zhou ying
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 09:24:36 EDT

  None (edit)
Description Cesar Wong 2016-05-04 13:38:25 EDT
Created attachment 1153959 [details]
scale request

Description of problem:

After a deployment has created a new pod, and deleted the old pod, clicking on the 
up arrow to scale up the pod results in a message saying 'Scaling up...' but nothing
happens.

Version-Release number of selected component (if applicable):
3.2

How reproducible:
Always

Steps to Reproduce:
1. create an app with new-app: 'oc new-app https://github.com/csrwng/simple-ruby.git'
2. after the build completes, and an initial deployment has happened, start a new
   build.
3. on the overview page, wait for the new deployment to create the new pod, and delete the previous pod.
4. immediately after the previous pod disappears, click on the up arrow to scale up.

Actual results:

The pod says 'Scaling...' but nothing happens.

Expected results:

The pod scales up successfully.

Additional info:
Comment 1 Cesar Wong 2016-05-04 14:42 EDT
Created attachment 1153982 [details]
event log
Comment 2 Jessica Forrester 2016-05-04 15:05:37 EDT
it seems like a race condition in the deployment controller, the UI is just updating the scale resource on the DC. The key seems to be related to the timing, if you scale up after the old deployment disappears, the new deployment has scaled up, but the deployment still says it is "in progress".
Comment 3 zhou ying 2016-05-05 02:24:34 EDT
We can reproduce by command:
`oc deploy simple-ruby --latest; oc scale dc/simple-ruby --replicas=5`
Comment 4 Michail Kargakis 2016-05-05 06:04:14 EDT
That's because 1) the deployment is running on a separate process with the desired replica size being fixed which means that the deployment needs to complete before being able to scale and 2) even after the deployment process finishes, it should be scaled up to dc.spec.replicas but we have hacked the controller to restore dc.spec.replicas back to rc.spec.replicas just because we need to support older clients that try to scale a deploymentconfig. For now, you should not try to scale the dc while a deployment is in-flight but set it prior to the deployment or after it is complete.
Comment 5 Samuel Padgett 2016-05-05 09:58:49 EDT
I'll disable the scaling controls during a deployment.
Comment 6 Michail Kargakis 2016-05-05 10:30:53 EDT
Thanks Sam!
Comment 7 Samuel Padgett 2016-05-05 13:07:28 EDT
https://github.com/openshift/origin/pull/8761
Comment 8 Samuel Padgett 2016-05-05 14:07:22 EDT
Pull request in the origin/master merge queue.
Comment 10 zhou ying 2016-05-30 23:51:19 EDT
Confirmed with ami devenv-rhel7_4294, When the deployment in-flight, the scale was disabled, but when the deployment completed, and the scale enable immediately scale up, will meet : the pod saying:scaling to x ..., but wait for a long time , the scale not succeed.
please see the attachments.
openshift v1.3.0-alpha.1-41-g681170a
kubernetes v1.3.0-alpha.1-331-g0522e63
etcd 2.3.0
Comment 11 zhou ying 2016-05-30 23:52 EDT
Created attachment 1163019 [details]
scaling
Comment 12 Samuel Padgett 2016-05-31 08:23:32 EDT
(In reply to zhou ying from comment #10)
> Confirmed with ami devenv-rhel7_4294, When the deployment in-flight, the
> scale was disabled, but when the deployment completed, and the scale enable
> immediately scale up, will meet : the pod saying:scaling to x ..., but wait
> for a long time , the scale not succeed.

There are several reasons this could happen and might not be a bug. Can you check that you're not at your pods quota and the browse events page to see if there are any warnings?
Comment 13 Samuel Padgett 2016-07-05 09:08:42 EDT
yinzhou@redhat.com Any update? Do you still see the problem?
Comment 14 zhou ying 2016-07-06 02:32:16 EDT
Confirmed with ami devenv-rhel7_4530, can't reproduce this issue now on browse. 

But by command:

[root@ip-172-18-2-106 amd64]# oc get po
NAME              READY     STATUS      RESTARTS   AGE
ruby-ex-1-build   0/1       Completed   0          7m
ruby-ex-3-hzkj1   1/1       Running     0          2m
ruby-ex-3-qpgrg   1/1       Running     0          2m
ruby-ex-3-unfuj   1/1       Running     0          2m
[root@ip-172-18-2-106 amd64]# oc deploy ruby-ex --latest ; oc scale dc/ruby-ex --replicas=5
Started deployment #4
Use 'oc logs -f dc/ruby-ex' to track its progress.
deploymentconfig "ruby-ex" scaled

[root@ip-172-18-2-106 amd64]# oc get po
NAME              READY     STATUS      RESTARTS   AGE
ruby-ex-1-build   0/1       Completed   0          12m
ruby-ex-4-26fsh   1/1       Running     0          4m
ruby-ex-4-hn8o8   1/1       Running     0          4m
ruby-ex-4-jiigp   1/1       Running     0          4m
Comment 15 Samuel Padgett 2016-07-06 09:01:19 EDT
Michail, Dan (Mace), do we want to guard against this problem when scaling with the CLI?
Comment 16 Samuel Padgett 2016-07-18 10:23:09 EDT
Reassigning since the web console side is fixed. See comment #14.
Comment 17 Michail Kargakis 2016-07-20 04:46:28 EDT
*** Bug 1353834 has been marked as a duplicate of this bug. ***
Comment 18 Michail Kargakis 2016-07-20 04:53:29 EDT
*** Bug 1306720 has been marked as a duplicate of this bug. ***
Comment 19 Michal Fojtik 2016-07-20 07:17:19 EDT
We will probably just display a warning to users in CLI, but after we talked with Michalis we don't want to prevent them from scaling.
Comment 20 Michal Fojtik 2016-08-11 03:39:27 EDT
Cesar, Sam: I don't think we can show a warning in CLI in a reasonable way as the `oc scale` is upstream. We will have to create 'smarter' wrapper that will check the state of DC. I'm not 100% convinced that we want to do that refactor to only gain the warning.

I'm in favor of closing this as the UI portion is now fixed. WDYT?
Comment 21 Cesar Wong 2016-08-11 09:52:33 EDT
Michal, I'm ok with closing it as well.
Comment 22 Michal Fojtik 2016-08-11 09:55:45 EDT
Setting ON_QA so QA can close this.
Comment 23 zhou ying 2016-08-11 23:26:04 EDT
Confirmed with 3.3 latest env, the issue has fixed on browse. 
openshift version
openshift v3.3.0.18
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

On browse when deploying, the scaling up arrow is disable.
Comment 25 errata-xmlrpc 2016-09-27 05:32:06 EDT
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-2016:1933

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