Bug 860954 - [US2597][fork] Can not create app with option "-a $appname -t $type" or " $appname -t $type" successfully
[US2597][fork] Can not create app with option "-a $appname -t $type" or " $ap...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
:
: 860931 860979 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 03:54 EDT by Rony Gong
Modified: 2015-05-14 22:05 EDT (History)
4 users (show)

See Also:
Fixed In Version: fork_ami_US2597_US2599_US2813_US2817_US2872_186
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:48:46 EST
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)

  None (edit)
Description Rony Gong 2012-09-27 03:54:26 EDT
Description of problem:
since we could get -a option in rhc app create -h
we could use -a option to create app

for this ami, we can create app only by
rhc app create <appname> -t php-5.3

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

How reproducible:
always


Steps to Reproduce:
1. rhc app create -a q3ruby19  -t ruby-1.9 
2.
3.
  
Actual results:
[root@F17x64-openshift rhc]# rhc app create -a q3ruby19  -t ruby-1.9 
Password: 

/usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/commands/base.rb:60:in `block in validate_args_and_options': Missing required argument 'cartridge'. (ArgumentError)
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/commands/base.rb:51:in `each'
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/commands/base.rb:51:in `each_with_index'
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/commands/base.rb:51:in `validate_args_and_options'
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/commands.rb:100:in `block (3 levels) in to_commander'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/runner.rb:402:in `run_active_command'
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/command_runner.rb:55:in `run!'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /usr/local/share/gems/gems/rhc-0.99.3/bin/rhc:57:in `<top (required)>'
	from /usr/local/bin/rhc:23:in `load'
	from /usr/local/bin/rhc:23:in `<main>'



Expected results:
could create app success, maybe both support add -a and don't add -a option.


Additional info:
Comment 1 John (J5) Palmieri 2012-09-27 19:14:32 EDT
removed a global option which used -t
Comment 2 Rony Gong 2012-09-27 22:43:53 EDT
restest it on my ruby-1.8 env, in fork_ami_US2597_US2599_US2813_US2817_US2872_173

[qgong@localhost rhc]$ rhc app create -a q3ruby19  -t ruby-1.9
/usr/lib/ruby/1.8/optparse.rb:1448:in `complete': ambiguous option: -t (OptionParser::AmbiguousOption)
	from /usr/lib/ruby/1.8/optparse.rb:1287:in `parse_in_order'
	from /usr/lib/ruby/1.8/optparse.rb:1254:in `catch'
	from /usr/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order'
	from /usr/lib/ruby/1.8/optparse.rb:1248:in `order!'
	from /usr/lib/ruby/1.8/optparse.rb:1339:in `permute!'
	from /usr/lib/ruby/1.8/optparse.rb:1360:in `parse!'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/runner.rb:337:in `parse_global_options'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/command_runner.rb:29:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.1.2/lib/commander/delegates.rb:7:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/bin/rhc:21
	from /usr/bin/rhc:19:in `load'
	from /usr/bin/rhc:19
Comment 3 Xiaoli Tian 2012-09-28 01:36:40 EDT
Tested on the version on fork_ami_US2597_US2599_US2813_US2817_US2872_173

1) rhc app create $appname -t $type does not work
[root@F17x64-openshift ~]# rhc app create app1 -t python-2.6 -l xtian+t5@redhat.com
/usr/local/share/gems/gems/commander-4.1.2/lib/commander/runner.rb:337:in `parse_global_options': ambiguous option: -t (OptionParser::AmbiguousOption)
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/command_runner.rb:29:in `run!'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /usr/local/share/gems/gems/rhc-0.99.3/bin/rhc:21:in `<top (required)>'
	from /usr/local/bin/rhc:23:in `load'
	from /usr/local/bin/rhc:23:in `<main>'

2) rhc app create -a $appname -t $type does not work 
[root@F17x64-openshift ~]# rhc app create -a app1 -t python-2.6 -l xtian+t5@redhat.com
/usr/local/share/gems/gems/commander-4.1.2/lib/commander/runner.rb:337:in `parse_global_options': ambiguous option: -t (OptionParser::AmbiguousOption)
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/command_runner.rb:29:in `run!'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
	from /usr/local/share/gems/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /usr/local/share/gems/gems/rhc-0.99.3/bin/rhc:21:in `<top (required)>'
	from /usr/local/bin/rhc:23:in `load'
	from /usr/local/bin/rhc:23:in `<main>'

3) Only rhc app create $appname $apptype works now
[root@F17x64-openshift ~]# rhc app create app1  python-2.6 -l xtian+t5@redhat.com
Password: *
Comment 4 John (J5) Palmieri 2012-09-28 12:37:34 EDT
*** Bug 860979 has been marked as a duplicate of this bug. ***
Comment 5 John (J5) Palmieri 2012-09-28 12:38:36 EDT
*** Bug 860931 has been marked as a duplicate of this bug. ***
Comment 6 John (J5) Palmieri 2012-09-28 18:28:46 EDT
Fixed lash with --timeout and --trace as well as allow options to map to arguments of different names.  In this case --type maps to the cartridge arg.
Comment 7 Rony Gong 2012-09-28 22:45:07 EDT
Verified on fork_ami_US2597_US259...US2817_US2872_186
[qgong@localhost dev]$ rhc app create -a qphp -t php-5.3
Password: 

Creating application 'qphp'
===========================

  Cartridge: php-5.3
  Scaling:   no
  Gear Size: default
  Namespace: qgong10

Your application's domain name is being propagated worldwide (this might take a minute)...
Initialized empty Git repository in /home/qgong/mytest/dev/qphp/.git/
done

RESULT:
Application qphp was created.

[qgong@localhost dev]$ rhc app create  q2php -t php-5.3
Password: 

Creating application 'q2php'
============================

  Cartridge: php-5.3
  Scaling:   no
  Namespace: qgong10
  Gear Size: default

Your application's domain name is being propagated worldwide (this might take a minute)...
Initialized empty Git repository in /home/qgong/mytest/dev/q2php/.git/
done

RESULT:
Application q2php was created.

[qgong@localhost dev]$ rhc app create  -a q4php php-5.3
Password: 

Creating application 'q4php'
============================

  Namespace: qgong10
  Scaling:   no
  Cartridge: php-5.3
  Gear Size: default

Your application's domain name is being propagated worldwide (this might take a minute)...
Initialized empty Git repository in /home/qgong/mytest/dev/q4php/.git/
done

RESULT:
Application q4php was created.

[qgong@localhost dev]$ rhc app create q5php php-5.3
Password: 

Creating application 'q5php'
============================

  Scaling:   no
  Cartridge: php-5.3
  Gear Size: default
  Namespace: qgong10

Your application's domain name is being propagated worldwide (this might take a minute)...
Initialized empty Git repository in /home/qgong/mytest/dev/q5php/.git/
done

RESULT:
Application q5php was created.

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