Description of problem: Version-Release number of selected component (if applicable): devenv_1884 How reproducible: Steps to Reproduce: 1.setup multi node env and create district 2.create scalable app(jbossas), jboss gear and haproxy gear not created in same instance 3.use rest api to get gears informations 4.for jbossas gear, I get gear git_url is: <git-url>ssh://4d84e1e0dc874ad99e0963d9d77e8362.rhcloud.com/~/git/jbosstest.git/</git-url> 5. I think the hostname of jbosstest-qgong3.dev.rhcloud.com is wrong, since jboss gear and haproxy gear are in different instance, so their host name shouldn't be same. Actual results: [root@localhost rony]# curl -k -X GET -H 'Accept: application/xml' --user qgong2:111111 https://ec2-184-72-77-16.compute-1.amazonaws.com/broker/rest/domains/qgong3/applications/jbosstest/gears <?xml version="1.0" encoding="UTF-8"?> <response> <supported-api-versions> <supported-api-version>1.0</supported-api-version> </supported-api-versions> <data> <gear> <git-url>ssh://bb6a965599874ccfb501c2f2be3390e5.rhcloud.com/~/git/jbosstest.git/</git-url> <uuid>bb6a965599874ccfb501c2f2be3390e5</uuid> <components> <component> <proxy-host>jbosstest-qgong3.dev.rhcloud.com</proxy-host> <internal-port>8080</internal-port> <proxy-port>38041</proxy-port> <name>jbossas-7</name> </component> <component> <proxy-host nil="true"></proxy-host> <internal-port nil="true"></internal-port> <proxy-port nil="true"></proxy-port> <name>haproxy-1.4</name> </component> </components> </gear> <gear> <git-url>ssh://4d84e1e0dc874ad99e0963d9d77e8362.rhcloud.com/~/git/jbosstest.git/</git-url> <uuid>4d84e1e0dc874ad99e0963d9d77e8362</uuid> <components> <component> <proxy-host>4d84e1e0dc-qgong3.dev.rhcloud.com</proxy-host> <internal-port>8080</internal-port> <proxy-port>38046</proxy-port> <name>jbossas-7</name> </component> </components> </gear> </data> <version>1.0</version> <type>gears</type> <status>ok</status> <messages/> </response> [root@localhost rony]# ssh 4d84e1e0dc874ad99e0963d9d77e8362.rhcloud.com Permission denied (publickey,gssapi-keyex,gssapi-with-mic). Expected results: the jboss gear git-url should be: <git-url>ssh://4d84e1e0dc874ad99e0963d9d77e8362.rhcloud.com/~/git/jbosstest.git/</git-url> Additional info:
if embed mysql or mongodb this error sometimes happened for mysql and mongodb, so up the priority. root@localhost rony]# curl -k -X GET -H 'Accept: application/xml' --user qgong2:111111 https://ec2-184-72-77-16.compute-1.amazonaws.com/broker/rest/domains/qgong3/applications/jbosstest/gears <?xml version="1.0" encoding="UTF-8"?> <response> <supported-api-versions> <supported-api-version>1.0</supported-api-version> </supported-api-versions> <data> <gear> <git-url>ssh://bb6a965599874ccfb501c2f2be3390e5.rhcloud.com/~/git/jbosstest.git/</git-url> <uuid>bb6a965599874ccfb501c2f2be3390e5</uuid> <components> <component> <proxy-host>jbosstest-qgong3.dev.rhcloud.com</proxy-host> <internal-port>8080</internal-port> <proxy-port>38041</proxy-port> <name>jbossas-7</name> </component> <component> <proxy-host nil="true"></proxy-host> <internal-port nil="true"></internal-port> <proxy-port nil="true"></proxy-port> <name>haproxy-1.4</name> </component> </components> </gear> <gear> <git-url>ssh://4627be68bc8647588f5b796bee84a963.rhcloud.com/~/git/jbosstest.git/</git-url> <uuid>4627be68bc8647588f5b796bee84a963</uuid> <components> <component> <password>FxQrE4_j_lgk</password> <connection-url>mongodb://4627be68bc-qgong3.dev.rhcloud.com:38066/</connection-url> <database-name>jbosstest</database-name> <username>admin</username> <proxy-host>4627be68bc-qgong3.dev.rhcloud.com</proxy-host> <internal-port>27017</internal-port> <proxy-port>38066</proxy-port> <name>mongodb-2.0</name> </component> </components> </gear> <gear> <git-url>ssh://4d84e1e0dc874ad99e0963d9d77e8362.rhcloud.com/~/git/jbosstest.git/</git-url> <uuid>4d84e1e0dc874ad99e0963d9d77e8362</uuid> <components> <component> <proxy-host>4d84e1e0dc-qgong3.dev.rhcloud.com</proxy-host> <internal-port>8080</internal-port> <proxy-port>38046</proxy-port> <name>jbossas-7</name> </component> </components> </gear> </data> <version>1.0</version> <type>gears</type> <status>ok</status> <messages/> </response>
I am not sure why this was transferred to broker. If there was a reason let me know. But looking at the above it appears to be a rest api issue. Namely with a scaled app the git url should only show up for the gear with haproxy.
Or another option is if you do want the git url to show up for all gears it should be the same as the one with haproxy for all gears.
The git url is also present in the application response object. Given that it is an application level thing, can we just get rid of it at the gear level? Do we expect any users to be using git_url from the gears rest api? Short of that, I would say just make them all the same as the haproxy gear.
I'm picking this one up. We've decided in the meeting to get rid of the git_url attribute from the /gears rest api. Pull request coming shortly.
https://github.com/openshift/crankcase/pull/223
Verified on devenv_stg_223, removed the git_url [root@localhost rony]# curl -k -X GET -H 'Accept: application/xml' --user qgong:111111 https://ec2-107-22-43-0.compute-1.amazonaws.com/broker/rest/domains/qgong/applications/riq05w4ffk/gears <?xml version="1.0" encoding="UTF-8"?> <response> <status>ok</status> <version>1.1</version> <data> <gear> <uuid>aa2d57168d7047bd99e6005b2e2ab4fe</uuid> <components> <component> <proxy-host>riq05w4ffk-qgong.dev.rhcloud.com</proxy-host> <name>python-2.6</name> <internal-port>8080</internal-port> <proxy-port>35546</proxy-port> </component> <component> <proxy-host nil="true"></proxy-host> <name>haproxy-1.4</name> <internal-port nil="true"></internal-port> <proxy-port nil="true"></proxy-port> </component> </components> </gear> <gear> <uuid>b70d8a3efbae403d9094b70ab14374db</uuid> <components> <component> <database-name>riq05w4ffk</database-name> <password>yf9ixRQVPe7y</password> <username>admin</username> <connection-url>mongodb://b70d8a3efb-qgong.dev.rhcloud.com:35551/</connection-url> <proxy-host>b70d8a3efb-qgong.dev.rhcloud.com</proxy-host> <name>mongodb-2.0</name> <internal-port>27017</internal-port> <proxy-port>35551</proxy-port> </component> </components> </gear> <gear> <uuid>86428379cd3d4afbade2dbfe674f7d6e</uuid> <components> <component> <proxy-host>86428379cd-qgong.dev.rhcloud.com</proxy-host> <name>python-2.6</name> <internal-port>8080</internal-port> <proxy-port>35541</proxy-port> </component> </components> </gear> </data> <type>gears</type> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> </supported-api-versions> <messages/> </response>