Bug 634961 - Inconsistent spacewalk-report format of output when using different options
Summary: Inconsistent spacewalk-report format of output when using different options
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 540
Hardware: All
OS: Linux
high
low
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers
TreeView+ depends on / blocked
 
Reported: 2010-09-17 12:52 UTC by Martin Minar
Modified: 2016-07-04 00:55 UTC (History)
4 users (show)

Fixed In Version: spacewalk-reports-1.2.2-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 14:46:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Minar 2010-09-17 12:52:54 UTC
Description of problem:
When I use spacewalk-report with different options:
no options
--multival-separator
--multival-on-rows
I will get None (,None,) for first two when field is empty
I will get empty string (,,) for last
It doesn't matter what report - tested on users, users-system, inventory - those contain empty fields

Version-Release number of selected component (if applicable):
Satellite 5.4, spacewalk-reports-1.2.2-1.el5sat

How reproducible:
deterministic

Steps to Reproduce:
1. Connect to Satellite, install spacewalk-reports
2. try: spacewalk-report --multival-separator=. users-systems
3. try: spacewalk-report users-systems
4. try: spacewalk-report --multival-on-rows users-systems
  
Actual results:
# spacewalk-report --multival-on-rows users-systems
organization_id,user_id,username,server_id,group,admin_access
1,1,admin,1000010000,,1
1,1,admin,1000010020,,1
...

# spacewalk-report users-systems
organization_id,user_id,username,server_id,group,admin_access
1,1,admin,1000010000,None,1
1,1,admin,1000010020,None,1
...

# spacewalk-report --multival-separator=. users-systems
organization_id,user_id,username,server_id,group,admin_access
1,1,admin,1000010000,None,1
1,1,admin,1000010020,None,1
...

Expected results:
Consistent None or empty string in all versions.

Additional info:
Not really functionality problem - therefor low/low, but since one of the possible usage of reports is to parse them - it might be appreciated by customers not to add more regulars like "\(None\)\?" into parsers.

Comment 3 Jan Pazdziora (Red Hat) 2010-09-20 07:37:11 UTC
This looks like a regression introduced by commit 92f09ae169b6697ae9ed2053ee99cea716e1fd88, in fix for bug 601984.

That

                                if outrow == None:
-                                       outrow = [ x for x in row ]
+                                       outrow = [ str(x) for x in row ]
                                        multival_dupes = {}

change stringifies the None to "None".

Comment 5 Jan Pazdziora (Red Hat) 2010-09-20 07:49:27 UTC
Fixed in Spacewalk master c2887fb7c6d7a2aa986d3e5a7e63e4c487624043.

Tagged in upstream as spacewalk-reports-1.2.3-1.

Comment 9 Jan Pazdziora (Red Hat) 2010-09-20 14:11:35 UTC
Cherry picked to Satellite master, a5283514b5762f950ffb444754ff9cbce8d6067d.

Tagged and built as spacewalk-reports-1.2.2-2.

Comment 14 Clifford Perry 2010-10-28 14:42:15 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


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