Bug 1009462 - unexpected behavior when messing with spacewalk-report options
Summary: unexpected behavior when messing with spacewalk-report options
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 560
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Ales Dujicek
URL:
Whiteboard:
Depends On:
Blocks: sat570-lowbug
TreeView+ depends on / blocked
 
Reported: 2013-09-18 13:53 UTC by Jan Hutař
Modified: 2015-01-13 09:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-13 09:54:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2013-09-18 13:53:18 UTC
Description of problem:
spacewalk-report should probably check its options more strictly or at least this should be investigated.


Version-Release number of selected component (if applicable):
spacewalk-reports-2.0.1-8.el5sat


How reproducible:
always


Steps to Reproduce:
1. # spacewalk-report inventory --like=profile_name='unknown_haha%'
   (same for "--where=pro...")


Actual results:
Same output as with no option specified as all (whole inventory is being listed)


Expected results:
I would expect error as I have used incorrect option or something


Additional info:
This is clearly typo/users error, but IMO some error message should appear.

Discovered while testing bug 972759.

I do not consider this a blocker for Sat560 release.

Comment 1 Tomáš Kašpárek 2013-10-01 13:38:46 UTC
--like=profile_name='unknown_haha%' vs. --like.profile_name='unknown_haha%' 

--like and --where should be followed by '-' sign and not equals sign as you've used

 spacewalk-report --help
Usage: /usr/bin/spacewalk-report [options] [report_name]

Options:
...
  --where-<column-id>=VALUE
                        limit the output to records where column-id has value
                        VALUE
  --like-<column-id>=VALUE
                        limit the output to records where column-id has value
                        like VALUE (string only)
...

Comment 2 Tomáš Kašpárek 2013-10-01 13:39:32 UTC
--like=profile_name='unknown_haha%' vs. --like.profile_name='unknown_haha%' 

should be:

--like=profile_name='unknown_haha%' vs. --like-profile_name='unknown_haha%'

Comment 3 Jan Hutař 2013-10-01 13:45:14 UTC
I meant that spacewalk-report should error out (should check for its options more strictly). Sorry for not making it clear in the initial description.

Comment 4 Tomáš Kašpárek 2013-10-01 14:55:52 UTC
fixed in spacewalk master: f29691fbb0a540ff206fee0d06e0e431d78f27af

Comment 6 Clifford Perry 2015-01-13 09:54:18 UTC
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff


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