Bug 591920

Summary: correct handling of error responses from the strata server
Product: Red Hat Enterprise Linux 6 Reporter: Gavin Romig-Koch <gavin>
Component: reportAssignee: Gavin Romig-Koch <gavin>
Status: CLOSED CURRENTRELEASE QA Contact: David Kutálek <dkutalek>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: ahecox, asersen
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: report-0.14-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 591921 (view as bug list) Environment:
Last Closed: 2010-11-10 21:29:15 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: 567972    
Bug Blocks: 591921    

Description Gavin Romig-Koch 2010-05-13 13:44:20 UTC
The strata server can indicate an error to the client either as HTTP error codes and/or STRATA_CODE headers, and both of these can additionally have either a STRATA_MESSAGE header and/or a response body containing the error message.  The response body can be XML or HTML (or potentially Text), the STRATA_MESSAGE will be XML.

Additionally, responses from the strata client library are not exclusively either success or failure, a response can indicate some combination of success and failure.  A single 'action' on the part of the client, for example creating a case, can involve multiple interactions with the server, POST to create the case, and one or more POSTs to attach files.  If for example, the case creation POST succeeds, but one of the attach POSTs fails, then the response must clearly indicate both.

Whatever the response(s) from the strata server, theses need to be converted to a single 'text' (optionally with an additional URL) response message for display by the report library.  The HTML and XML need to be converted to text, either by 'formatting' it, or by ignoring it, and mapping the codes to error messages.

Advice from the Strata Server developer, Tim Walsh was:
For the time being just read the STRATA_CODE and STRATA_MESSAGE headers and if there is an error condition then skip the body.

Comment 2 RHEL Program Management 2010-05-13 15:19:44 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Gavin Romig-Koch 2010-05-14 20:48:16 UTC
fixed upstream.

Comment 7 Gavin Romig-Koch 2010-07-01 15:52:25 UTC
While this bz was fixed in report-0.14-1, it will not be testable/verifiable in default RHEL6 until strata is enabled in RHEL6: 

    https://bugzilla.redhat.com/show_bug.cgi?id=567972

Comment 10 Gavin Romig-Koch 2010-10-04 14:43:41 UTC
This bz was about making the Strata client more general, so it could gracefully handle future changes to the Strata server.   I was able to test this earlier by introducing temporary changes in the server, and then testing the client.

The easiest way to test this now would be to build a 'test server' and have it do things that exersise this functionality in the client.  I don't have time to do this, and I don't think it is actually worth it to do at this point in time.

Would it be possible for me to just say this is verified?  Or would that be short circuiting the process.

Comment 12 releng-rhel@redhat.com 2010-11-10 21:29:15 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.