Description of problem: Trying to create application with cartridge manifest url via RESTAPI or RHC, both failed with error: Invalid cartridge '$cartridgename-$cartridgeversion' specified #rhc app create phpv2new https://raw.github.com/xltian/phpv2newcartridge/master/metadata/manifest.yml The cartridge 'https://raw.github.com/xltian/phpv2newcartridge/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: domx1 Cartridges: https://raw.github.com/xltian/phpv2newcartridge/master/metadata/manifest.yml Gear Size: default Scaling: no Creating application 'phpv2new' ... Invalid cartridge 'phpxiaoli-5.3' specified. Version-Release number of selected component (if applicable): devenv_3202 How reproducible: Always Steps to Reproduce: 1.Creating an application with valid cartridge manifest url in v2 mode via RESTAPI or rhc # curl -k -s -H "Content-Type: application/json" -u xtian+t1:x https://localhost/broker/rest/domains/domx1/applications -X POST -d '{"name":"phpapp1","cartridge":{"url" : "https://raw.github.com/xltian/phpv2cartridge/master/metadata/manifest.yml "}}' Actual results: Show such error: Invalid cartridge 'phpxiaoli-5.3' specified. Expected results: It could create application with valid cartridge manifest url successfully Additional info: Should be an regression since it worked on devenv_3188 according to https://bugzilla.redhat.com/show_bug.cgi?id=958799#c10 Broker log is attached
Created attachment 745560 [details] broker log Please check log in attachment
There's at least one broker bug in play here: https://github.com/openshift/origin-server/blame/master/controller/app/models/application.rb#L161 CartridgeCache isn't being fed the Application instance, and so the find_cartridges method can't access the Application.downloaded_cartridges function. Fixing that in my local branch only exposed more problems: The cart URL isn't being sent on the configure call to the node.
Fixed with https://github.com/openshift/origin-server/pull/2409
Verified it on devenv_3207, it works now. # rhc app create perlapp1 https://raw.github.com/xltian/perlv2newcartridge/master/metadata/manifest.yml The cartridge 'https://raw.github.com/xltian/perlv2newcartridge/master/metadata/manifest.yml' will be downloaded and installed Application Options ------------------- Namespace: domx1 Cartridges: https://raw.github.com/xltian/perlv2newcartridge/master/metadata/manifest.yml Gear Size: default Scaling: no Creating application 'perlapp1' ... done Waiting for your DNS name to be available ... done Downloading the application Git repository ... Initialized empty Git repository in /root/perlapp1/.git/ Your application code is now in 'perlapp1' perlapp1 @ http://perlapp1-domx1.dev.rhcloud.com/ (uuid: 518c9a54ae14b4198d000001) ---------------------------------------------------------------------------------- Created: 2:57 AM Gears: 1 (defaults to small) Git URL: ssh://518c9a54ae14b4198d000001.rhcloud.com/~/git/perlapp1.git/ SSH: 518c9a54ae14b4198d000001.rhcloud.com perlv2-5.10 (Perl 5.10) ----------------------- Gears: 1 small RESULT: Application perlapp1 was created.