Bug 1003014
Summary: | Cartridge name issue | ||
---|---|---|---|
Product: | OpenShift Online | Reporter: | Fenix Steffel <steffel.fenix> |
Component: | Pod | Assignee: | Rajat Chopra <rchopra> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.x | CC: | ccoleman, jhou |
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-09-19 16:48:43 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
Fenix Steffel
2013-08-30 13:39:39 UTC
The broker should not allow downloadable cartridges to be installed where Name.downcase != Cartridge-Short-Name.downcase. Or if the node is validating, the node should result in an error. This breaks the REST API (cartridge not found) in a way that means the REST API is disabled, so high severity. Haven't had the chance to look into this completely. Could you please take a look? The names can actually be different. No issues. The 'name' is used to refer to the cartridge for controlling it, while cartridge-short-name is used by the node to set the ENV variables. e.g. with this example : Name: app1 Cartridge-Short-Name: APP2 expect that cartridge will be installed in something like : /var/lib/5128238ab23923982c92f/app1/ while the env variable to point to that dir will be called OPENSHIFT_APP2_DIR Not sure what the steps to the problem you faced. Please share the actual cartridges, if its not an issue. Hi, Fenix Steffel: I'm not sure my steps are same as yours, please correct me if necessary, here is my findings: Create two applications with 2 cartridges, the cartridges have same 'Name' but different 'Cartridge-Short-name', could refer to https://raw.github.com/jhou1/openshift-custom-perl/master/metadata/manifest.yml and https://raw.github.com/jhou1/openshift-custom-perl1/master/metadata/manifest.yml When the 2nd app is being created with the 2nd cartridge, my cli shows "/var/lib/openshift/52312cdc6849bb57700000f7/v2perl/bin/setup: line 10: OPENSHIFT_PERL_DIR: unbound variable" and fails. It will help a lot if you could share your actual cartridges. I'm assigning this back to see if this needs further fix, thanks. Hi, I've corrected the names but: https://raw.github.com/worldline/openshift-geoserver-cartridge/master/metadata/manifest.yml And https://github.com/worldline/openshift-postgis-cartridge/commit/8d4f8e68a36e3acbfcb0feb2f2e28374faf45447#diff-0 ----- Create two applications with 2 cartridges, the cartridges have same 'Name' but different 'Cartridge-Short-name', could refer to https://raw.github.com/jhou1/openshift-custom-perl/master/metadata/manifest.yml and https://raw.github.com/jhou1/openshift-custom-perl1/master/metadata/manifest.yml ----- Yes Please ignore comment 4, looks like the Cartridge-Short-Name I used is incorrect, the actual cartridge has been provided. https://raw.github.com/worldline/openshift-geoserver-cartridge/master/metadata/manifest.yml The geoserver cartridge has other things missing in it, so I could not see the exact problem. However, I found one issue with the code and that is related to 'Name' of cartridge not being in the 'Categories', and possibly that caused the error seen in this case. Fix provided in https://github.com/openshift/origin-server/pull/3631 For testing : 1. Create an app 2. Embed a downloadable cartridge e.g. https://raw.github.com/rajatchopra/openshift-origin-cartridge-cassandra/master/metadata/manifest.yml 3. Embed another downloadable cartridge with modified manifest (e.g. a modified mysql/mongo/redis cartridge). Change the manifest such that the Name is 'cassandra' again. Ensure that 'cassandra' does not exist in the Categories of this second cartridge. You can use this for above : https://raw.github.com/smarterclayton/openshift-redis-cart/master/metadata/manifest.yml (just serve the manifest from somewhere else after modifying the Name to cassandra) Before fix: Error in second install - Invalid cartridge. Valid values are (mock-plugin-0.1, cron-1.4, phpmyadmin-4, rockmongo-1.1, switchyard-0, metrics-0.1, 10gen-mms-agent-0.1,mysql-5.1, haproxy-1.4, postgresql-9.2, postgresql-8.4, mongodb-2.2, jenkins-client-1) Also the app will become useless with respect to managing the first 'cassandra' cart install. This app is gone, only destroy can happen. After fix: Error in second install - cassandra is already an embedded feature in the application The second app is prevented from being installed. @jhou : As a side note, the issue with your perl cartridge is the Cartridge-Short-Name. It should be PERL and V2PERL, because thats what the setup script is expecting. Thats why you get OPENSHIFT_PERL_DIR: unbound variable. Check comment#3. HTH. **Note : in the previous comment (comment#7) - s/Categories/Provides/g The Name may not exist in Provides (nothing to do with Categories here). Sorry for the confusion. Verified on devenv_3780 Steps: 1. Create an app 2. Embed a downloadable cartridge e.g. https://raw.github.com/rajatchopra/openshift-origin-cartridge-cassandra/master/metadata/manifest.yml 3. Embed another downloadable cartridge https://raw.github.com/jhou1/openshift-redis-cart/master/metadata/manifest.yml Result: Adding https://raw.github.com/jhou1/openshift-redis-cart/master/metadata/manifest.yml to application 'd1' ... cassandra is already an embedded feature in the application |