Description of problem: According to the writers guide, cart versions should be of the form: <number>[.<number>[.<number>[...]]] But we don't validate against this in the runtime. It should fail if you have letters in your versions for example.
Fixed in https://github.com/openshift/origin-server/pull/2979
(In reply to Jhon Honce from comment #1) > Fixed in https://github.com/openshift/origin-server/pull/2979 Hi, Jhon Just fyi that above pull request has failed the merge testing, not sure if you've already noted. Thanks for checking.
Assign it back to get more attention since related pull request is not merged yet.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/d9323dfffe5e57b3fa427e726e08ad2d37ae0d66 Bug 980253 - Validate version numbers from manifest * Add Manifest.sort_versions to sort version numbers meaningfully * Rebase for LXC container
test on devenv_3483, there is warning message shown when create app with invalid version cartridge. but the Reference ID should not be shown steps: 1. prepare a download cartridge, eg: ruby 2. change the Versions: ['1.9', '1.8'] in manifest.yml (eg: change to Versions: ['a1.9', '1.8']) 3. create the app with download cartridge prepared in step1&2 4. modify the Version: '1.9' in manifest.yml (eg:change to Version: '1.9c') 5. create the app with download cartridge again 6. modify the Cartridge-Version number 0.0.4 in manifest.yml (eg: change to Cartridge-Version number 0.a0.4 ) 7. repeat step5 step3: [root@ip-10-147-221-130 dyruby]# rhc app create -a rubyapp1 https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml -l yaXX -p XXX The cartridge 'https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: ccc Cartridges: https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml Gear Size: default Scaling: no Creating application 'rubyapp1' ... Unable to complete the requested operation due to: Version number a1.9 is invalid: 'Versions'. Reference ID: fc7fcc40313e61a65b8527858b60dc5e step5: [root@ip-10-147-221-130 dyruby]# rhc app create -a rubyapp1 https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml -l yaXX -p XXX The cartridge 'https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: ccc Cartridges: https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml Gear Size: default Scaling: no Creating application 'rubyapp1' ... Unable to complete the requested operation due to: Version number 1.9c is invalid: 'Version'. Reference ID: 49e1d03ec479debf2c6478e5fa701417 step7: [root@ip-10-147-221-130 dyruby]# rhc app create -a rubyapp1 https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml -l yaXX -p XXX The cartridge 'https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: ccc Cartridges: https://raw.github.com/duyanyan/dyruby/master/metadata/manifest.yml Gear Size: default Scaling: no Creating application 'rubyapp1' ... Unable to complete the requested operation due to: Cartridge-Version number 0.a0.4 is invalid: 'Version'. Reference ID: 0e00e7c95fb314dc0a37b670eb60786c
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/0fa67c104e4cf0a6e7ad79d588dd3520925801d2 Bug 980253 - Map illegal versions to 0.0.0 * Raising exception broke CDK which uses illegal version numbers
According to defect 988727, we should not use invalid cartridge version.
If invalid cartridge version used, error message pops up, for example, "cp: cannot stat `/var/lib/openshift/51f5d7e16cec0e27be000235/perl//versions/0.0.0/etc/*': No such file or directory"
The CDK created invalid cartridge version numbers and to continue to support those cartridges created by the CDK we now map invalid cartridge numbers to 0.0.0. For this test to work you must support version 0.0.0.
For custom cartridge with invalid version format, it will redirect to 0.0.0 and popup error about dir does not exist. Manually create 0.0.0 dir under versions dir. App will be created successfully. [root@dhcp-10-180 openshiftest]# rhc app create appperl https://github.com/bmeng/bmeng_cart_perl/raw/master/metadata/manifest.yml The cartridge 'https://github.com/bmeng/bmeng_cart_perl/raw/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: bmengdev Cartridges: https://github.com/bmeng/bmeng_cart_perl/raw/master/metadata/manifest.yml Gear Size: default Scaling: no Creating application 'appperl' ... cp: cannot stat `/var/lib/openshift/109784612893244197437440/perl//versions/0.0.0/etc/*': No such file or directory [root@dhcp-10-180 openshiftest]# rhc app create appperl https://github.com/bmeng/bmeng_cart_perl/raw/master/metadata/manifest.yml The cartridge 'https://github.com/bmeng/bmeng_cart_perl/raw/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: bmengdev Cartridges: https://github.com/bmeng/bmeng_cart_perl/raw/master/metadata/manifest.yml Gear Size: default Scaling: no Creating application 'appperl' ... done Waiting for your DNS name to be available ... done Cloning into 'appperl'... Warning: Permanently added 'appperl-bmengdev.dev.rhcloud.com' (RSA) to the list of known hosts. Your application 'appperl' is now available. URL: http://appperl-bmengdev.dev.rhcloud.com/ SSH to: a5d08c24f90f11e299cc12313d2d26a2.rhcloud.com Git remote: ssh://a5d08c24f90f11e299cc12313d2d26a2.rhcloud.com/~/git/appperl.git/ Cloned to: /root/openshiftest/appperl Run 'rhc show-app appperl' for more details about your app. Move bug to verified.