Bug 1102485 - capsule: Unhandled error when passing bad id to 'hammer capsule content'
Summary: capsule: Unhandled error when passing bad id to 'hammer capsule content'
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Proxy
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-29 04:30 UTC by Corey Welton
Modified: 2020-04-15 14:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-04 12:42:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1164233 0 low CLOSED Provide better error string when attempting to synchronize internal capsule 2021-02-22 00:41:40 UTC

Internal Links: 1164233

Description Corey Welton 2014-05-29 04:30:22 UTC
Description of problem:

When accidentally passing the fqdn of a capsule rather than id (or presumably any bad string, really), we get an unhandled trace.

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

Satellite-6.0.3-RHEL-6-20140528.4
How reproducible:


Steps to Reproduce:
1.  Try to submit a sync command to capsule, using an invalid string for --id (i.e., maybe the capsule fqdn)
2.  View results.


Actual results:
root@ibm-x3550m3-07 ~]# hammer capsule content synchronize
Could not synchronize capsule content:
  missing param 'id' in parameters
[root@ibm-x3550m3-07 ~]# hammer capsule content synchronize --id cloud-qe-9.idm.lab.bos.redhat.com
/usr/lib/ruby/gems/1.8/gems/fast_gettext-0.8.0/lib/fast_gettext/vendor/string.rb:56:in `_fast_gettext_old_format_m': malformed format string - %; (ArgumentError)
        from /usr/lib/ruby/gems/1.8/gems/fast_gettext-0.8.0/lib/fast_gettext/vendor/string.rb:56:in `%'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/utils.rb:12:in `format'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/output/adapter/abstract.rb:27:in `print_error'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/output/output.rb:16:in `print_error'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/exception_handler.rb:43:in `print_error'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/exception_handler.rb:60:in `handle_general_exception'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/exception_handler.rb:26:in `send'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/exception_handler.rb:26:in `handle_exception'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:188:in `handle_exception'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:26:in `run'
        from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
        from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/bin/hammer:100
        from /usr/bin/hammer:19:in `load'
        from /usr/bin/hammer:19


Expected results:
Clean handling of the invalid input.  Perhaps something as easy as

Unknown 'id': <string>

Additional info:

Comment 2 Pavel Moravec 2014-11-14 12:06:11 UTC
Little bit related: bz1164233

Comment 4 Bryan Kearney 2016-10-04 12:42:15 UTC
I could not recreate this on satellite 6.3. I am closing this out as NEXTRELEASE.


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