Bug 1031821

Summary: Improve error message: Failed to correctly execute all parallel operations
Product: OpenShift Online Reporter: Jessica Forrester <jforrest>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: jhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1040646 (view as bug list) Environment:
Last Closed: 2014-01-30 00:50:26 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: 1040646    

Description Jessica Forrester 2013-11-18 21:13:44 UTC
The exception message: "Failed to correctly execute all parallel operations" should be improved to provide additional context for what operations actually failed.  This will improve both end user experience and our exception reporting in new relic.

Comment 1 Rajat Chopra 2013-11-23 00:54:11 UTC
Fixed with https://github.com/openshift/origin-server/pull/4241

The message now contains which ops failed.

Note : The rhc client tool does not give the 'debug' messages as contained in the REST output, perhaps we need the client tool to be enhanced?

e.g. if a node times out processing a parallel request, the REST response will contain a debug message like : (Gear Id: 52136834) Execution expired.
But the 'rhc' tool does not show it.

Comment 2 Jianwei Hou 2013-11-25 06:42:08 UTC
Verified on devenv_4067

Modify pending_app_op_group.rb as following:
failed_ops << tag["op_id"] # if status != 0

Then restart services and clear broker cache. 
Create one application via RESTAPI
curl -s -k -H 'Content-Type: Application/json' --user jhou:x https://ec2-23-22-167-139.compute-1.amazonaws.com/broker/rest/domains/jhou/applications/ -X POST -d '{"name":"d1", "cartridge":"diy-0.1"}'

Result:
The ops class will be displayed to tell user
{
    "api_version": 1.6,
    "data": null,
    "messages": [
        {
            "exit_code": 0,
            "field": null,
            "index": null,
            "severity": "result",
            "text": "Disclaimer: This is an experimental cartridge that provides a way to try unsupported languages, frameworks, and middleware on OpenShift.\n"
        },
        {
            "exit_code": 0,
            "field": null,
            "index": null,
            "severity": "error",
            "text": "Unable to complete the requested operation due to: Failed to correctly execute all parallel operations - [\"UpdateAppConfigOp\", \"AddBrokerAuthKeyOp\"].\nReference ID: 2a187f2946964ce241e5468576ad695d"
        }
    ],
    "status": "internal_server_error",
    "supported_api_versions": [
        1.0,
        1.1,
        1.2,
        1.3,
        1.4,
        1.5,
        1.6
    ],
    "type": null,
    "version": "1.6"
}