Bug 961216 - [fork][v2carts][runtime_554]Failed to create application with valid cartridge manifest url
[fork][v2carts][runtime_554]Failed to create application with valid cartridge...
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
: Regression, TestBlocker
Depends On:
  Show dependency treegraph
Reported: 2013-05-09 03:07 EDT by Xiaoli Tian
Modified: 2015-05-14 22:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-05-11 16:21:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Xiaoli Tian 2013-05-09 03:07:37 EDT
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):

How reproducible:

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@redhat.com: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 03:08:42 EDT
Created attachment 745560 [details]
broker log

Please check log in attachment
Comment 2 Dan Mace 2013-05-09 11:36:09 EDT
There's at least one broker bug in play here:


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 12:49:26 EDT
Fixed with https://github.com/openshift/origin-server/pull/2409
Comment 4 Xiaoli Tian 2013-05-10 03:00:43 EDT
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@perlapp1-domx1.dev.rhcloud.com/~/git/perlapp1.git/
  SSH:     518c9a54ae14b4198d000001@perlapp1-domx1.dev.rhcloud.com

  perlv2-5.10 (Perl 5.10)
    Gears: 1 small

Application perlapp1 was created.

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