Bug 961216 - [fork][v2carts][runtime_554]Failed to create application with valid cartridge manifest url
Summary: [fork][v2carts][runtime_554]Failed to create application with valid cartridge...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-09 07:07 UTC by Xiaoli Tian
Modified: 2015-05-15 02:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-11 20:21:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
broker log (7.74 KB, text/plain)
2013-05-09 07:08 UTC, Xiaoli Tian
no flags Details

Description Xiaoli Tian 2013-05-09 07:07:37 UTC
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

Comment 1 Xiaoli Tian 2013-05-09 07:08:42 UTC
Created attachment 745560 [details]
broker log

Please check log in attachment

Comment 2 Dan Mace 2013-05-09 15:36:09 UTC
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.

Comment 3 Rajat Chopra 2013-05-09 16:49:26 UTC
Fixed with https://github.com/openshift/origin-server/pull/2409

Comment 4 Xiaoli Tian 2013-05-10 07:00:43 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.