Bug 1028154 - Cartridges with non-redhat vendor aren't consistently returned by cartridge list mechanisms
Summary: Cartridges with non-redhat vendor aren't consistently returned by cartridge l...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-07 19:12 UTC by Dan Mace
Modified: 2015-05-14 23:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 23:51:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan Mace 2013-11-07 19:12:59 UTC
Description of problem:

Cartridges whose vendor is not `redhat` aren't being returned consistently by all the mechanisms used for obtaining a cartridge list (most importantly, by the openshift MCollective agent used to drive the REST API).

Version-Release number of selected component (if applicable):


How reproducible:

Follow the detailed steps below.

Steps to Reproduce:

# create a vendored cartridge
cp -R /var/lib/openshift/.cartridge_repository/redhat-php /var/lib/openshift/.cartridge_repository/dmace-php 
sed -i 's/Cartridge-Vendor: redhat/Cartridge-Vendor: dmace/g' /var/lib/openshift/.cartridge_repository/dmace-php/0.0.7/metadata/manifest.yml
service ruby193-mcollective restart && service rhc-broker restart && oo-admin-broker-cache -c

# vendored cartridge will appear here
oo-devel-node cartridge-list

# vendored cartridge will NOT appear here
/opt/rh/ruby193/root/usr/sbin/mco rpc -q openshift cartridge_repository action=list

# (ruby script) vendored cartridge will NOT appear here even though the action is implemented
# the same as `oo-devel-node cartridge-list`
require 'mcollective'
include MCollective::RPC
printrpc rpcclient('openshift').cartridge_do(:action => 'cartridge-list', :cartridge => 'openshift-origin-node', :process_results => true, :args => {"--porcelain"=>true,"--with-descriptors"=>true,"--cart-name"=>"openshift-origin-node"})


Actual results:

The non-redhat cartridge appears in some calls, and not in others.

Expected results:

The non-redhat cartridge should appear in all contexts.


Additional info:

Comment 1 Dan Mace 2013-11-07 22:45:58 UTC
It appears that the cartridge repository doesn't index on vendor in any way, so most likely all same-named cartridges are being collapsed in the index hash:

https://github.com/openshift/origin-server/blob/master/node/lib/openshift-origin-node/model/cartridge_repository.rb#L324

Comment 2 Jhon Honce 2014-01-30 23:51:04 UTC
Issue may be tracked: https://trello.com/c/4Hy0Hu67


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