Bug 519985

Summary: CRM #1942512 - API configchannel.lookupFileInfo doesn't return the file contents
Product: Red Hat Satellite 5 Reporter: Issue Tracker <tao>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Dimitar Yordanov <dyordano>
Severity: medium Docs Contact:
Priority: medium    
Version: 520CC: cperry, dyordano, fnadge, jsherril, tao, xdmoon
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: This BZ just requested to verify configchannel.lookupFileInfo API call returns file_contents attribute Consequence: Behavior was verified. Fix: No fix. Result: configchannel.lookupFileInfo API call returns file_contents on sat53
Story Points: ---
Clone Of:
: 555326 (view as bug list) Environment:
Last Closed: 2011-02-01 10:32:17 UTC Type: ---
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: 518253, 555326    

Description Issue Tracker 2009-08-27 21:21:55 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Issue Tracker 2009-08-27 21:21:57 UTC
Event posted on 08-27-2009 01:38am EDT by pmutha

State whether Satellite or RHN hosted 
- Satellite v5.2
 
Indicate the platform(s) (architectures) the problem is being reported against.
- RHEL 4 U7 i386 platform.

Provide clear and concise problem description as it is understood at the time of escalation
- API configchannel.lookupFileInfo doesn't return the file contents even though the documentation says it should.



How Reproducible
- Always

Steps to Reproduce
- Sample API 
#!/usr/bin/python

import xmlrpclib
server_url='https://<satellite-fqdn>/rpc/api'
xmlrpclib.Server(server_url)
sc = xmlrpclib.Server(server_url)
sk = sc.auth.login('<username>', '<password>')
result = sc.configchannel.lookupFileInfo(sk,'<config channel>',["<config-file-path>"])
print result[0]['contents']




Observed Behavior
- {'binary': False, 'macro-start-delimiter': '{|', 'group': 'root', 'creation': <DateTime '20090806T17:12:17' at 2b96c6b73ef0>, 'modified': <DateTime '20090806T17:12:17' at 2b96c6b73f38>, 'macro-end-delimiter': '|}', 'channel': 'akash-test-config-channel', 'owner': 'root', 'path': '/tmp/plain.sh', 'permissions': 644, 'type': 'file', 'md5': '482cd68390050eaf68a3feb4d0561afe', 'revision': 3}

Traceback (most recent call last):
  File "lookupfileinfo.py", line 11, in ?
    print result[0]['contents']
KeyError: 'contents'


Expected Behavior
- Contents of the file should have been displayed as the file was text file instead of traceback.
"this is test-1 file"

Action Required from SEG 
- We have also tested this against Satellite v5.3 and it works fine as expected. Contents of text file are displayed.
So would like a confirmation from SEG if this was a bug on Satellite v5.2.

Have attached satellite-debug of the test satellite on which issue was reproduced.
Let me know if you need any other details on this.

Regards,
Paresh
This event sent from IssueTracker by xdmoon  [Support Engineering Group]
 issue 335390

Comment 2 Xixi 2009-08-27 21:24:21 UTC
For Engineering: this BZ is to make sure above bug goes through QA.

Comment 3 Tomas Lestach 2010-01-14 13:40:50 UTC
Because the described problem works on sat53, closing this bug as NOTABUG.

For sat52maint, I cloned the bug: BZ#555326

Comment 4 Tomas Lestach 2010-01-18 14:16:36 UTC
Please, ignore the previous comment.

I confirm, configchannel.lookupFileInfo doesn't return 'contents' on sat52, but it works as expected on sat53.

Moving to ON_QA, like Xixi requested in Commment#3.

Comment 6 Justin Sherrill 2010-07-09 21:32:11 UTC
Flipping back to modified, so the errata system can do the right thing.

Comment 7 Tomas Lestach 2010-08-19 12:23:52 UTC
Moving back to ON_QA, since errata tool didn't do the right thing.

Comment 9 Dimitar Yordanov 2011-01-10 12:24:00 UTC
The issue was tested on:
Sat 5.3 OS:RHEL5  Arch:x86_64
Sat 5.3 OS:RHEL5  Arch:i386
Sat 5.3 OS:RHEL4  Arch:s390x

and no problems were encountered.

Comment 10 Florian Nadge 2011-01-17 13:56:47 UTC
Please be so kind and add a few key words to the Technical Notes of this
Bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:

For details, see:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Thanks

Comment 11 Florian Nadge 2011-01-17 13:56:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:

Consequence:

Fix:

Result:

Comment 12 Tomas Lestach 2011-01-17 15:02:55 UTC
Filling up Technical Notes.

Comment 13 Tomas Lestach 2011-01-17 15:02:55 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1,9 @@
 Cause:
-
+This BZ just requested to verify
+configchannel.lookupFileInfo API call returns file_contents attribute
 Consequence:
-
+Behavior was verified.
 Fix:
-
+No fix.
-Result:+Result:
+configchannel.lookupFileInfo API call returns file_contents on sat53

Comment 14 errata-xmlrpc 2011-02-01 10:32:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0189.html