Bug 1276602

Summary: Should not give error when oc scale for deploymentconfig with "--timeout" given
Product: OKD Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, cryan, mmccomas
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-15 16:38:22 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:
Embargoed:

Description Xingxing Xia 2015-10-30 09:25:51 UTC
Description of problem:
Use oc scale for deploymentconfig with "--timeout" option, it outputs error such as: Error from server: replicationControllers "database" not found.


Version-Release number of selected component (if applicable):
oc v1.0.7-18-gf4f3bcd
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
Always


Steps to Reproduce:
1. oc login and create a project
2. create application
$ oc new-app -f origin/examples/sample-app/application-template-stibuild.json
3. Check the rc and dc
$ oc get rc
$ oc get dc
4. scale for rc and dc
1> $ oc scale rc database-1 --replicas=2 --timeout=10m
replicationcontroller "database-1" scaled
2> $ oc scale dc database --replicas=3 --timeout=10m
Error from server: replicationControllers "database" not found
3>  $ oc scale dc database --replicas=3
deploymentconfig "database" scaled



Actual results:
4
2> Outputs error as in the step


Expected results:
4
2> Should succeed

Additional info:

Comment 1 Fabiano Franz 2015-11-02 18:31:13 UTC
Fixed by https://github.com/openshift/origin/pull/5576

Comment 2 openshift-github-bot 2015-11-03 06:36:00 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/dee161b464d594c58c3cd6b977f4e81c60b76643
Bug 1276602 - fixes error when scaling dc with --timeout

Comment 3 Xingxing Xia 2015-11-04 06:15:53 UTC
Verified against version:
openshift/oc v1.0.7-239-gb5cfb09
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

The bug is fixed.
Move it to VERIFIED

Comment 4 Chris Ryan 2016-04-14 22:39:19 UTC
Still seeing the original bug behavior in the latest devenv, with:

oc v1.1.6
kubernetes v1.2.0-36-g4a3f9c5
4.4.6-300.fc23.x86_64

1) oc new-project bof0f
2) oc new-app openshift/perl:5.16 --code=https://github.com/openshift/sti-perl -l app\=test-perl --context-dir=5.16/test/sample-test-app/ --name=myapp
3) oc scale replicationcontrollers myapp-1 --replicas=2 --timeout=20s --config=/home/cryan/workdir/helmsdeep-cryan/ose_test1.kubeconfig
      replicationcontroller "myapp-1" scaled
4)  oc scale deploymentconfigs myapp-1 --replicas=2 --timeout=20s --config=/home/cryan/workdir/helmsdeep-cryan/ose_test1.kubeconfig
      Error from server: deploymentconfigs "myapp-1" not found

Comment 5 Chris Ryan 2016-04-14 22:47:03 UTC
Devenv info: devenv-centos7_3971 (ami-fbe8fa91)

Comment 6 Xingxing Xia 2016-04-15 03:05:32 UTC
Chris, typo in your step 4): "deploymentconfigs myapp-1". Should use "deploymentconfigs myapp", which works well. Your step 2) will print what it creates, including deploymentconfigs *myapp*.

Comment 7 Chris Ryan 2016-04-15 16:38:22 UTC
$ oc get deploymentconfigs
NAME      REVISION   REPLICAS   TRIGGERED BY
myapp     1          2          config,image(myapp:latest)

$ oc get replicationcontrollers 
NAME      DESIRED   CURRENT   AGE
myapp-1   2         2         1m

confirmed, thanks Xingxing. It would seem to me this is a limitation in the way these things are named. Thank you!