Bug 1009462

Summary: unexpected behavior when messing with spacewalk-report options
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Ales Dujicek <adujicek>
Severity: low Docs Contact:
Priority: unspecified    
Version: 560CC: adujicek, cperry, tkasparek
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-13 09:54:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1127641    

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