Description of problem: Client messages returned from the node to the broker via 'CLIENT_MESSAGE' output is not passed through to the rhc client during 'app-destroy' operations. Version-Release number of selected component (if applicable): How reproducible: Create an an application with a cartridge which produces output during deconfigure. Delete the application. Observe the lack of client output. Steps to Reproduce: 1. Create a jenkins application. 2. Create a PHP application with the jenkins-client cartridge embedded. 3. Destroy the PHP application. Actual results: MCollective output: I, [2013-05-21T12:25:22.141050 #11009] INFO -- : openshift.rb:43:in `cartridge_do_action' cartridge_do_action call / action: cartridge_do, agent=openshift, data={:cartridge=>"openshift-origin-node", :action=>"app-destroy", :args=> {"--with-app-uuid"=>"519b9fb7142fd82aca000001", "--with-app-name"=>"phpjenk", "--with-container-uuid"=>"519b9fb7142fd82aca000001", "--with-container-name"=>"phpjenk", "--with-namespace"=>"dmace280", "--with-request-id"=>"b4f2e3e6ae237d5f12bcdf4b397a72ad", "--cart-name"=>"openshift-origin-node"}, :process_results=>true} I, [2013-05-21T12:25:22.141444 #11009] INFO -- : openshift.rb:44:in `cartridge_do_action' cartridge_do_action validation = openshift-origin-node app-destroy {"--with-app-uuid"=>"519b9fb7142fd82aca000001", "--with-app-name"=>"phpjenk", "--with-container-uuid"=>"519b9fb7142fd82aca000001", "--with-container-name"=>"phpjenk", "--with-namespace"=>"dmace280", "--with-request-id"=>"b4f2e3e6ae237d5f12bcdf4b397a72ad", "--cart-name"=>"openshift-origin-node"} I, [2013-05-21T12:25:22.141735 #11009] INFO -- : openshift.rb:83:in `execute_action' Executing action [app-destroy] using method oo_app_destroy with args [{"--with-app-uuid"=>"519b9fb7142fd82aca000001", "--with-app-name"=>"phpjenk", "--with-container-uuid"=>"519b9fb7142fd82aca000001", "--with-container-name"=>"phpjenk", "--with-namespace"=>"dmace280", "--with-request-id"=>"b4f2e3e6ae237d5f12bcdf4b397a72ad", "--cart-name"=>"openshift-origin-node"}] I, [2013-05-21T12:25:26.344834 #11009] INFO -- : openshift.rb:92:in `execute_action' Finished executing action [app-destroy] (0) I, [2013-05-21T12:25:26.345089 #11009] INFO -- : openshift.rb:63:in `cartridge_do_action' cartridge_do_action reply (0): ------ CLIENT_RESULT: The corresponding job 'phpjenk-build' in Jenkins has been disabled. CLIENT_RESULT: You can re-enable or delete as desired. CLIENT_RESULT: Job URL: https://jenkins-dmace280.dev.rhcloud.com/job/phpjenk-build/ CLIENT_RESULT: Jenkins client 1.4 has been removed from: phpjenk ------) Client output: $ rhc app-delete phpjenk -pp --confirm Deleting application 'phpjenk' ... deleted Expected results: Client output: $ rhc app-delete phpjenk -pp --confirm Deleting application 'phpjenk' ... deleted The corresponding job 'phpjenk-build' in Jenkins has been disabled. You can re-enable or delete as desired. Job URL: https://jenkins-dmace280.dev.rhcloud.com/job/phpjenk-build/ Jenkins client 1.4 has been removed from: phpjenk Additional info:
This is not a new bug. This has been broken for a while. Can we live it for one more sprint. I would like to put in a more comprehensive fix.
https://github.com/openshift/origin-server/pull/2666
Tested this issue on devenv_3319, it still could be reproduced. steps: 1) create jenkins server app 2) create php cartridge app and with jenkins embedded. 3) delete the php app actual result: [zqzhao@dhcp-13-222 myshell]$ rhc app delete zqphp --confirm Deleting application 'zqphp' ... deleted expect result: [zqzhao@dhcp-13-222 myshell]$ rhc app delete zqphp --confirm Deleting application 'zqphp' ... deleted The corresponding job 'zqphp-build' in Jenkins has been disabled. You can re-enable or delete as desired. Job URL:https://zqjenkins-zqd.dev.rhcloud.com/job/zqphp-build/ Jenkins client 1.4 has been removed from: zqphp
I am guessing the rhc client tools are still using REST API 1.4 or earlier. In order to get the response from node on app delete the client tools need to switch to 1.5 (current) version.
The following is testing on devenv_3329 . destroy one app with jenkins embedded use rest api: the result also have not we expect: The corresponding job 'zqphp-build' in Jenkins has been disabled. You can re-enable or delete as desired. Job URL:https://zqjenkins-zqd.dev.rhcloud.com/job/zqphp-build/ Jenkins client 1.4 has been removed from: zqphp [zqzhao@dhcp-13-222 myshell]$ curl -k -H 'Accept: application/xml' --user zzhao:redhat https://ec2-23-22-66-250.compute-1.amazonaws.com/broker/rest/domains/zqd/applications/zqphp -X DELETE <?xml version="1.0" encoding="UTF-8"?> <response> <status>ok</status> <type nil="true"></type> <data> <datum nil="true"></datum> </data> <messages> <message> <severity>info</severity> <text>Application zqphp is deleted.</text> <exit-code nil="true"></exit-code> <field nil="true"></field> </message> </messages> <version>1.5</version> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> <supported-api-version>1.2</supported-api-version> <supported-api-version>1.3</supported-api-version> <supported-api-version>1.4</supported-api-version> <supported-api-version>1.5</supported-api-version> </supported-api-versions> <errors/> </response>
That comment is to the REST API - we're handling 1.5 in a different pull.
After this pull request merges https://github.com/openshift/origin-server/pull/2875 The rest api will return the correct result from destroying apps with jenkins client cartridge (shown below). However, the client tools still do not show this message. Assigning to CLI team to fix the last piece to make this work. { "api_version": 1.5, "data": null, "errors": { }, "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Application happ is deleted." }, { "exit_code": 0, "field": null, "severity": "result", "text": "The corresponding job 'happ-build' in Jenkins has been disabled.\nYou can re-enable or delete as desired.\nJob URL: https://app-lnader.dev.rhcloud.com/job/happ-build/\nJenkins client 1.4 has been removed from: happ\n" } ], "status": "ok", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 ], "type": null, "version": "1.5" }
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/826c997de11507c0fe3a7937bcd4fe4180191f45 Bug 965804
RHC changes are in https://github.com/openshift/rhc/pull/407
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/403b65d87b3315a68824c502eb2948d1c32d2132 Bug 965804 - Display results when a cartridge or application is removed Upgrade client to 1.5. Older servers will NOT retrieve results.
Verified on INT(devenv_3382),rhc is build from devenv_3383. Result: 1.client [sunwei@dhcp-8-229 ~]$ rhc app-delete jb This is a non-reversible action! Your application code and data will be permanently deleted if you continue! Are you sure you want to delete the application 'jb'? (yes|no): yes Deleting application 'jb' ... deleted Application jb is deleted. The corresponding job 'jb-build' in Jenkins has been disabled. You can re-enable or delete as desired. Job URL: https://jks-wsun1int.int.rhcloud.com/job/jb-build/ Jenkins client 1.4 has been removed from: jb 2.RESTAPI <messages> <message> <severity>info</severity> <text>Application jbs is deleted.</text> <exit-code>0</exit-code> <field nil="true"></field> </message> <message> <severity>result</severity> <text>The corresponding job 'jbs-build' in Jenkins has been disabled. You can re-enable or delete as desired. Job URL: https://jks-wsun1int.int.rhcloud.com/job/jbs-build/ Jenkins client 1.4 has been removed from: jbs </text> <exit-code>0</exit-code> <field nil="true"></field> </message> </messages>