Hide Forgot
+++ This bug was initially created as a clone of Bug #1033572 +++ Description of problem: Create an application with auto_deploy disabled. Hot deploy this app via RESTAPI, the returned message show that hot_deploy is false. So is the case with force_clean_build. Push commits to the app and then invoke RESTAPI to hot deploy the app. The returned content of RESTAPI shows that hot_deploy is false. Moreover, the app's web page returns 404. Version-Release number of selected component (if applicable): On STG(devenv-stage_582) How reproducible: Always Steps to Reproduce: 1. Create an applicaton rhc create-app php1 php-5.3 2. Make some change to app, commit and push 3. Hot deploy this app with RESTAPI curl -s -k -H 'Content-Type: Application/json' --user jhou:x https://stg.openshift.redhat.com/broker/rest/domains/jhou/applications/p1/deployments -X POST -d '{"hot_deploy":true}' Actual results: After step 3: Although the hot_deploy is set as true, the returned message indicate hot_deploy is false. <------------------------> curl -s -k -H 'Content-Type: Application/json' --user jhou:x https://stg.openshift.redhat.com/broker/rest/domains/jhou/applications/p1/deployments -X POST -d '{"hot_deploy":true}' { "api_version": 1.6, "data": { "activations": [ "2013-11-22T12:04:41Z" ], "created_at": "2013-11-22T12:04:20Z", "force_clean_build": false, "hot_deploy": false, "id": "c57c21f7", "ref": "master", "sha1": "508b7b7" }, "messages": [ { "exit_code": 0, "field": null, "index": null, "severity": "info", "text": "Added c57c21f7 to application p1" } ], "status": "created", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 ], "type": "deployment", "version": "1.6" } <------------------------> Expected results: The returned message should show that hot_deploy is true. So is the case with force_clean_build, RESTAPI shows that force_clean_build is false then deploying this app with this feature enabled. Additional info: --- Additional comment from Andy Goldstein on 2013-11-22 10:06:22 EST --- This is actually an issue where the node isn't defaulting the git ref if it's not passed in from the broker. --- Additional comment from Andy Goldstein on 2013-11-22 11:02:10 EST --- https://github.com/openshift/origin-server/pull/4226 --- Additional comment from openshift-github-bot on 2013-11-22 12:59:12 EST --- Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/f906a06c6de191787e7a03c32a41b78f937498a4 Bug 1033572 Use git ref default logic for both 'git push' and RESTful deployments
Next build of rubygem-openshift-origin-node origin-server: commit 4f62f95016444001463aa1bbfd4148fe19686b9b Author: Andy Goldstein <andy.goldstein> Date: Fri Nov 22 10:50:03 2013 -0500 https://github.com/openshift/enterprise-server/pull/174
Verify this bug with rubygem-openshift-origin-node-1.17.5.3-1. hot_deploy and force_clean_build option both work well for deploying app manually via REST API. [root@broker app]# curl -s -k -H 'Content-Type: Application/json' --user gpei:redhat https://broker.ose20-1216-com.cn/broker/rest/domains/o00/applications/app/deployments -X POST -d '{"hot_deploy":true}' {"api_version":1.6,"data":{"activations":["2013-12-25T08:50:11Z"],"created_at":"2013-12-25T08:50:04Z","force_clean_build":false,"hot_deploy":true,"id":"a22e5068","ref":"master","sha1":"b6d77e5"},"messages":[{"exit_code":0,"field":null,"index":null,"severity":"info","text":"Added a22e5068 to application app"}],"status":"created","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":"deployment","version":"1.6"} [root@broker app]# curl -s -k -H 'Content-Type: Application/json' --user gpei:redhat https://broker.ose20-1216-com.cn/broker/rest/domains/o00/applications/app/deployments -X POST -d '{"force_clean_build":true}' {"api_version":1.6,"data":{"activations":["2013-12-25T08:51:17Z"],"created_at":"2013-12-25T08:51:11Z","force_clean_build":true,"hot_deploy":false,"id":"6469a58f","ref":"master","sha1":"b6d77e5"},"messages":[{"exit_code":0,"field":null,"index":null,"severity":"info","text":"Added 6469a58f to application app"}],"status":"created","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":"deployment","version":"1.6"}