Bug 1028154 - Cartridges with non-redhat vendor aren't consistently returned by cartridge list mechanisms
Cartridges with non-redhat vendor aren't consistently returned by cartridge l...
Status: CLOSED UPSTREAM
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 14:12 EST by Dan Mace
Modified: 2015-05-14 19:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-30 18:51:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Mace 2013-11-07 14:12:59 EST
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 17:45:58 EST
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 18:51:04 EST
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.