Bug 970008
Summary: | Account can't be connected after adding a downloadable cartridge if the app already has a same addon cartridge added previously | ||
---|---|---|---|
Product: | OpenShift Online | Reporter: | joycezhang <jinzhang> |
Component: | Pod | Assignee: | Abhishek Gupta <abhgupta> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.x | CC: | abhgupta, dmcphers, jhou, jinzhang, jliggitt, rchopra, xtian |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-06-11 04:15:57 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: |
Description
joycezhang
2013-06-03 10:06:34 UTC
Enabling HTTP_DEBUG=1, this is the request that breaks: GET /broker/rest/domains/stgtest1/applications?include=cartridges HTTP/1.1 accept: application/json;version=1.4 authorization: Bearer ... User-Agent: rhc/1.10.1 (ruby 1.9.3; x86_64-linux) (2.3.3, ruby 1.9.3 (2013-05-15)) Date: Mon, 03 Jun 2013 12:22:11 GMT Host: stg.openshift.redhat.com = Response HTTP/1.1 500 Date: Mon, 03 Jun 2013 12:22:11 GMT Server: Apache/2.2.15 (Red Hat) X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.17 X-Request-Id: abc11d4c9a9cc34121d788bf6bdd8b3a X-Runtime: 0.307087 Cache-Control: private X-Rack-Cache: miss Content-Length: 728 Status: 500 Content-Type: text/html; charset=utf-8 Strict-Transport-Security: max-age=15768000, includeSubDomains Vary: Accept-Encoding,User-Agent ProxyTime: D=318328 Connection: close We need to ensure that this is not the same issue as bug 968254. In case of bug 968254, one of the application was created using a community cartridge before a fix went in related to cartridge vendor name handling. The resolution in that case was to re-create the application and things worked just fine. The issue is with the component_name that is stored in mongo. In that application, it did not include the cartridge_vendor name. To verify if this is the same issue, please get the mongo dump of the applications within the domain and check whether the component_name attribute has the cartridge vendor name appended to it. This applies to apps with community cartridges in them and hence no migration script is provided since production does not have any applications with community carts. @Abhishek, 968254 never existed in stage. The issue is an apparent addition of two similar cartridges with different vendor information being added to an application. 1. Create an app and add mysql to it 2. To the app, add a downloadable cartridge that provides mysql (e.g. wsun-mysql-5.1) 3. Try to do rhc domain show and it will show similar symptoms as above. Fixed this problem with rev#152beec9118e4d1 Now step#2 will not succeed and will not spoil the app. For the current app, it must be deleted and recreated - no other option unless a manual cleanup of mongo is undertaken. Tested on STG(devenv-stage_357), an error message will be shown to prevent adding a downloadable cartridge if the app already has a same addon cartridge added previously as below: # rhc cartridge add https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml -a php1 -l jinzhang+2 -p redhatThe cartridge 'https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml' will be downloaded and installed Adding https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml to application 'php1' ... mysql is already an embedded feature in the application If trying to add a downloadable cartridge firstly, and then add a similar cartridge, it would be different as below: 1. Create an app and add a downloadable cartridge: # rhc cartridge add https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml -a php1 -l jinzhang+2 -p redhat The cartridge 'https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml' will be downloaded and installed Adding https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml to application 'php1' ... Success jhou-mysql-5.1 (MySQL Database 5.1) ----------------------------------- From: https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml Gears: Located with php-5.3, openshift-downloadable-mock-plugin-0.1 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ Database Name: php1 Password: BMmv-1bTMwe3 Username: adminRYP2qi6 RESULT: Added jhou-mysql-5.1 to application php1 MySQL 5.1 database added. Please make note of these credentials: Root User: adminRYP2qi6 Root Password: BMmv-1bTMwe3 Database Name: php1 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ You can manage your new MySQL database by also embedding phpmyadmin-3.4. The phpmyadmin username and password will be the same as the MySQL credentials above. 2. Add a similiar addon cartridge, it will use the added downloadable cartridge as below # rhc cartridge add mysql-5.1 -a php1 -l jinzhang+2 -p redhat Adding mysql-5.1 to application 'php1' ... Success jhou-mysql-5.1 (MySQL Database 5.1) ----------------------------------- From: https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml Gears: Located with php-5.3, openshift-downloadable-mock-plugin-0.1 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ Database Name: php1 Password: BMmv-1bTMwe3 Username: adminRYP2qi6 RESULT: Added mysql-5.1 to application php1 # rhc domain show -l jinzhang+2 -p redhat Applications in teststg23 domain -------------------------------- php1 @ http://php1-teststg23.stg.rhcloud.com/ (uuid: 51ad9abe2587c844670001b8) ------------------------------------------------------------------------------ Created: 3:43 PM Gears: 1 (defaults to small) Git URL: ssh://51ad9abe2587c844670001b8.rhcloud.com/~/git/php1.git/ SSH: 51ad9abe2587c844670001b8.rhcloud.com php-5.3 (PHP 5.3) ----------------- Gears: Located with jhou-mysql-5.1 jhou-mysql-5.1 (MySQL Database 5.1) ----------------------------------- From: https://raw.github.com/jhou1/v2mysql/master/metadata/manifest.yml Gears: Located with php-5.3, openshift-downloadable-mock-plugin-0.1 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ Database Name: php1 Password: BMmv-1bTMwe3 Username: adminRYP2qi6 It will always be successfull when adding mysql-5.1 to this app, and only the downloadable cartridge will be returned as above. Could you please help confirm if it works as design? Thanks. |