This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 850205 - traceback when bad option is provided to wallaby
traceback when bad option is provided to wallaby
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: wallaby (Show other bugs)
2.2
Unspecified Unspecified
low Severity low
: 2.3
: ---
Assigned To: Will Benton
Lubos Trilety
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-21 09:49 EDT by Lubos Trilety
Modified: 2013-03-06 13:45 EST (History)
4 users (show)

See Also:
Fixed In Version: wallaby-0.16.2-1
Doc Type: Bug Fix
Doc Text:
Cause: Previous versions of the wallaby shell failed to trap certain errors from the parameter handling library. Consequence: Previous versions of the wallaby shell displayed unfriendly error messages to users if they were invoked with incorrect command-line arguments. Fix: The wallaby shell now traps these errors. Result: The error message displayed when wallaby is invoked with incorrect command-line arguments is now user-friendly.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-06 13:45:10 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 Lubos Trilety 2012-08-21 09:49:30 EDT
Description of problem:
If the wallaby is run with --h (--a, --p, --u) it ends with traceback output similar to this one:
# wallaby --h
/usr/lib/ruby/1.8/optparse.rb:1379:in `complete': ambiguous option: --h (OptionParser::AmbiguousOption)
	from /usr/lib/ruby/1.8/optparse.rb:1212:in `order!'
	from /usr/lib/ruby/1.8/optparse.rb:1205:in `catch'
	from /usr/lib/ruby/1.8/optparse.rb:1205:in `order!'
	from /usr/lib/ruby/1.8/optparse.rb:1279:in `permute!'
	from /usr/lib/ruby/1.8/optparse.rb:1300:in `parse!'
	from /usr/lib/ruby/site_ruby/1.8/mrg/grid/config/shell.rb:144:in `main'
	from /usr/bin/wallaby:21

Version-Release number of selected component (if applicable):
wallaby-0.12.5-10

How reproducible:
100%

Steps to Reproduce:
1. run wallaby --h
2. see result
3.
  
Actual results:
ruby traceback is printed

Expected results:
The option is correctly parsed, no traceback printed

Additional info:
Comment 1 Will Benton 2012-08-21 13:51:38 EDT
There is a fix in the bz850205 branch, which will be merged into master at some point in the future.
Comment 3 Lubos Trilety 2012-12-11 06:14:33 EST
Tested with wallaby-0.16.1-2

--h and --p works fine, but --a and --u have still similar issue.

# wallaby --u
/usr/lib/ruby/1.8/optparse.rb:451:in `parse': missing argument: --u (OptionParser::MissingArgument)
	from /usr/lib/ruby/1.8/optparse.rb:1266: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/site_ruby/1.8/mrg/grid/config/shell.rb:144:in `main'
	from /usr/bin/wallaby:21

# wallaby --a
/usr/lib/ruby/1.8/optparse.rb:451:in `parse': missing argument: --a (OptionParser::MissingArgument)
	from /usr/lib/ruby/1.8/optparse.rb:1266: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/site_ruby/1.8/mrg/grid/config/shell.rb:144:in `main'
	from /usr/bin/wallaby:21

>>> assigned
Comment 4 Will Benton 2013-01-04 16:44:17 EST
Missing arguments are handled now as well.
Comment 5 Lubos Trilety 2013-01-18 05:58:00 EST
Tested with:
wallaby-utils-0.16.3-1
wallaby-0.16.3-1

Tested on:
RHEL6 x86_64,i386
RHEL5 x86_64,i386

all tested options works correctly --a, --u, --h, --p

>>> verified
Comment 7 errata-xmlrpc 2013-03-06 13:45:10 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0564.html

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