Bug 1276602 - Should not give error when oc scale for deploymentconfig with "--timeout" given
Should not give error when oc scale for deploymentconfig with "--timeout" given
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2015-10-30 05:25 EDT by Xingxing Xia
Modified: 2016-04-15 12:38 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-04-15 12:38:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Xingxing Xia 2015-10-30 05:25:51 EDT
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:

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:
2> Outputs error as in the step

Expected results:
2> Should succeed

Additional info:
Comment 1 Fabiano Franz 2015-11-02 13:31:13 EST
Fixed by https://github.com/openshift/origin/pull/5576
Comment 2 openshift-github-bot 2015-11-03 01:36:00 EST
Commit pushed to master at https://github.com/openshift/origin

Bug 1276602 - fixes error when scaling dc with --timeout
Comment 3 Xingxing Xia 2015-11-04 01:15:53 EST
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 18:39:19 EDT
Still seeing the original bug behavior in the latest devenv, with:

oc v1.1.6
kubernetes v1.2.0-36-g4a3f9c5

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 18:47:03 EDT
Devenv info: devenv-centos7_3971 (ami-fbe8fa91)
Comment 6 Xingxing Xia 2016-04-14 23:05:32 EDT
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 12:38:22 EDT
$ oc get deploymentconfigs
myapp     1          2          config,image(myapp:latest)

$ oc get replicationcontrollers 
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!

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