Hide Forgot
Created attachment 819044 [details] manifest file used Description of problem: Prepare an download cartridge, with "." or "_" in cartridge name, for example: Name: p.hp Cartridge-Short-Name: PHP Display-Name: PHP 5.3 Try to create an application with this download cartridge. It will fail, saying "Unable to complete the requested operation due to: An invalid exit code (1) was returned from the server ex-std-node2.stg.rhcloud.com. This indicates an unexpected problem during the execution of your request.." Version-Release number of selected component (if applicable): STG(devenv_stage_549) How reproducible: always Steps to Reproduce: 1. Prepare an download cartridge, with "." or "_" in cartridge name 2. Try to create an application with the download cartridge rhc app create myapp https://raw.github.com/qiushui/php/master/metadata/manifest.yml 3. Actual results: The application will not be created. Error message are show, saying "Unable to complete the requested operation due to: An invalid exit code (1) was returned from the server ex-std-node2.stg.rhcloud.com. This indicates an unexpected problem during the execution of your request.." Expected results: 1. If the characters are not legal, we should return message similar to "Invalid manifest file from url 'https://raw.github.com/qiushui/php/master/metadata/manifest.yml' - 'p?hp' does not match pattern /\A[a-z0-9](?:[-\.a-z0-9_]*[a-z0-9]|)\z/.: 'Name'" So that user will know that their cartridge name is illegal. 2. If the characters are expected, the application should be created successfully. Additional info: The manifest.yml file used is added to the bug as an attachment.
The configure call passes just fine. The post-configure fails. Because the cartridge 'name' check is not uniform. Manifest check seems to allow '_', but v2_cart_model.rb:121 does not - results = cartridge_name.scan(/([a-zA-Z\d-]+)-([\d\.]+)/).first The above check is inconsistent with manifest parsing checks in - openshift-origin-common/models/manifest.rb:179
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/094176408d1a2b9f0211caa05bd5f92cfdc068e6 Bug 1026273 - Allow the '_' character in cartridge name
Tested on devenv_4016. I could create the application successfully with manifest.yml like the following: --- Name: p_hp Cartridge-Short-Name: PHP Display-Name: PHP 5.3 Description: ! 'PHP is a general-purpose server-side scripting language originally designed for Web development to produce dynamic Web pages. Popular development frameworks include: CakePHP, Zend, Symfony, and Code Igniter.' Version: '5.3' License: The PHP License, version 3.0 License-Url: http://www.php.net/license/3_0.txt Vendor: php.net Cartridge-Version: 0.0.7 Compatible-Versions: [] Cartridge-Vendor: 88_qiushui Categories: - service - php - web_framework Website: http://www.php.net Help-Topics: Developer Center: https://www.openshift.com/developers Cart-Data: - Key: OPENSHIFT_TMP_DIR Type: environment Description: Directory to store application temporary files. - Key: OPENSHIFT_REPO_DIR Type: environment Description: Application root directory where application files reside. This directory is reset every time you do a git-push - Key: OPENSHIFT_PHP_PORT Type: environment Description: Internal port to which the web-framework binds to. - Key: OPENSHIFT_PHP_IP Type: environment Description: Internal IP to which the web-framework binds to. - Key: OPENSHIFT_APP_DNS Type: environment Description: Fully qualified domain name for the application. - Key: OPENSHIFT_APP_NAME Type: environment Description: Application name - Key: OPENSHIFT_DATA_DIR Type: environment Description: Directory to store application data files. Preserved across git-pushes. Not shared across gears. - Key: OPENSHIFT_APP_UUID Type: environment Description: Unique ID which identified the application. Does not change between gears. - Key: OPENSHIFT_GEAR_UUID Type: environment Description: Unique ID which identified the gear. This value changes between gears. Provides: - php-5.3 - php Publishes: get-php-ini: Type: FILESYSTEM:php-ini Subscribes: set-env: Type: ENV:* Required: false set-doc-url: Type: STRING:urlpath Required: false Scaling: Min: 1 Max: -1 Endpoints: - Private-IP-Name: IP Private-Port-Name: PORT Private-Port: 8080 Public-Port-Name: PROXY_PORT Protocols: - http - ws Options: primary: true Mappings: - Frontend: '' Backend: '' Options: websocket: true - Frontend: /health Backend: '' Options: health: true #Source-Url: git://github.com/qiushui/php.git #Source-Url: https://github.com/qiushui/php.git #Source-Url: https://github.com/qiushui/php/raw/master/php.zip #Source-Url: https://github.com/qiushui/php/raw/master/php.tar.gz Source-Url: https://github.com/qiushui/php/raw/master/php.tar #Source-Md5: d2149849f4a57fb06dc996db2cb03c2e #Source-Url: file:///root/php/ Mark the bug as verified.