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:
removed a global option which used -t
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
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 /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 /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 Password: *
*** Bug 860979 has been marked as a duplicate of this bug. ***
*** Bug 860931 has been marked as a duplicate of this bug. ***
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.
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.