Bug 815372 - system.getScriptResults does return malformed XML
system.getScriptResults does return malformed XML
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: API (Show other bugs)
1.8
All Linux
medium Severity high
: ---
: ---
Assigned To: Tomas Lestach
Dimitar Yordanov
:
Depends On:
Blocks: space18
  Show dependency treegraph
 
Reported: 2012-04-23 09:46 EDT by Tomas Lestach
Modified: 2012-11-01 12:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 784288
Environment:
Last Closed: 2012-11-01 12:18:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Lestach 2012-04-23 09:46:11 EDT
+++ This bug was initially created as a clone of Bug #784288 +++

Created attachment 557237 [details]
xml output

Description of problem:

The system.getScriptResults call does return invalid XML


How reproducible:

$key = "75284";
$schedule = $client->call('system.getScriptResults',$session,$key);
for my $sched (@$schedule)
{
  print "ScheduleID: $key\tReturncode: $sched->{'returnCode'}\n";
}
not well-formed (invalid token) at line 258, column 46, byte 13433 at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/XML/Parser.pm line 187

Actual results:

$ xmllint --noout fault2.xml 
fault2.xml:219: parser error : PCDATA invalid Char value 27
Starting Nagios Service Mode for 120 hours...              [  OK  ]
                                              ^
fault2.xml:219: parser error : PCDATA invalid Char value 27
Starting Nagios Service Mode for 120 hours...              [  OK  ]
                                                    ^
fault2.xml:219: parser error : PCDATA invalid Char value 27
Starting Nagios Service Mode for 120 hours...              [  OK  ]

Expected results:

valid XML
Comment 1 Tomas Lestach 2012-04-23 09:53:20 EDT
The reproducer isn't specified at all.

Here's a valid one:
1. setup following Remote Command:
service httpd restart
2. run rhn_check on the client
3. call system.getScriptResults API to get the script result

Actual results:
Traceback (most recent call last):
  File "./get_script_results.py", line 14, in <module>
    result = client.system.getScriptResults(key, script_id)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1575, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1467, in parse_response
    p.feed(data)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 6, column 58

Additional info: "^[" does cause the trouble in this case


spacewalk.git: 0104135e1ff03c8bea04230d9cdc5b23e66cf297
Comment 3 Jan Pazdziora 2012-10-30 15:23:24 EDT
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Comment 4 Jan Pazdziora 2012-11-01 12:18:37 EDT
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18

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