Bug 972387

Summary: Create app with -r followed by other options will make the option recognized as an option to -r.
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: jhou, xtian
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: 2013-06-12 21:08:03 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 Liang Xia 2013-06-09 04:35:56 UTC
Description of problem:
Create app with -r option followed by other options, say -s, then the app becomes unscalable as -s was recognized as argument to -r.

Version-Release number of selected component (if applicable):
devenv_3339
How reproducible:
always
Steps to Reproduce:
1.rhc app create app2 jbossas -r -s;
2.
3.
Actual results:
The app1 is created unscalable.
<==Output begin==>
[root@dhcp-8-109 ~]# rhc app create app2 jbossas -r -s
Using jbossas-7 (JBoss Application Server 7) for 'jbossas'

Application Options
-------------------
  Namespace:  lxia
  Cartridges: jbossas-7
  Gear Size:  default
  Scaling:    no

Creating application 'app2' ... done

Waiting for your DNS name to be available ... done

Downloading the application Git repository ...
Initialized empty Git repository in /root/app2/.git/
The authenticity of host 'app2-lxia.dev.rhcloud.com (174.129.139.189)' can't be established.
RSA key fingerprint is d8:48:6b:4e:bb:0f:9c:37:df:42:03:d4:80:22:6d:b1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'app2-lxia.dev.rhcloud.com' (RSA) to the list of known hosts.

Your application code is now in '-s'
/usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/git_helpers.rb:36:in `chdir': No such file or directory - -s (Errno::ENOENT)
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/git_helpers.rb:36:in `git_clone_application'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/commands/app.rb:157:in `create'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/highline_extensions.rb:177:in `call'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/highline_extensions.rb:177:in `section'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/highline_extensions.rb:191:in `paragraph'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/helpers.rb:257:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/helpers.rb:257:in `paragraph'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/commands/app.rb:155:in `create'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/highline_extensions.rb:177:in `call'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/highline_extensions.rb:177:in `section'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/highline_extensions.rb:191:in `paragraph'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/helpers.rb:257:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/helpers.rb:257:in `paragraph'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/commands/app.rb:153:in `create'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/commands.rb:241:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/commands.rb:241:in `execute'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/commands.rb:232:in `to_commander'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:400:in `run_active_command'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/command_runner.rb:73:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/delegates.rb:7:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/lib/rhc/cli.rb:36:in `start'
	from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.1/bin/rhc:20
	from /usr/bin/rhc:19:in `load'
	from /usr/bin/rhc:19
<==Output end==>
Expected results:
An error showed: missing argument: -r
Then the usage info.
Then quit.
Additional info:

Comment 1 Jianwei Hou 2013-06-09 04:48:20 UTC
adding rhc version: 1.10.1

Comment 2 Clayton Coleman 2013-06-12 21:08:03 UTC
-r always takes an argument - what if you wanted to use the name of a directory with a dash in it?