Bug 1033564

Summary: Unable to add cartridge to an application with a file scheme
Product: OpenShift Container Platform Reporter: Nan Wei <nwei>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0CC: libra-onpremise-devel, lmeyer, nwei, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-08 08:29:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Nan Wei 2013-11-22 11:49:58 UTC
Description of problem:
When add download cartridge with a file scheme like "Source-Url: file:///root/perlv2cart/" to an app, it throws some error messages as follow: 
"Unexpected error: CLIENT_ERROR: No cartridge sources found to install." But this issue does NOT happen against online devenv.It is also successful to add cartridge with another scheme like "Source-Url: https://github.com/nanwei/perlv2cart.git" in the ose.
Version-Release number of selected component (if applicable):
Openshift Enterprise: 2.0/2013-11-15.1
How reproducible:
always
Steps to Reproduce:
1. Add cartridge with manifest.yml to an app 
$ rhc app create ppp https://raw.github.com/nanwei/perlv2cart/master/metadata/manifest.yml
$ wget https://raw.github.com/nanwei/perlv2cart/master/metadata/manifest.yml; cat manifest.yml
<--snip-->
Source-Url: file:///root/perlv2cart/
<--snip-->
Actual results:
Unexpected error: CLIENT_ERROR: No cartridge sources found to install.
Expected results:
Add successfully and no error message.
Additional info

Comment 2 Brenton Leanhardt 2014-01-06 17:09:39 UTC
Just to clarify, does file:///root/perlv2cart/ actually exist on the Node where the application is being installed?  Online devenvs are usually all-in-one hosts but perhaps the environment you are testing in has more than one Node and the file isn't available.

Comment 3 Nan Wei 2014-01-07 10:28:59 UTC
Openshift Enterprise: 2013-12-30.1

[root@broker ~]# mco ping
node2.ose12-1216-com.cn                  time=113.84 ms
node1.ose12-1216-com.cn                  time=151.73 ms

step 1
does file:///root/perlv2cart/ actually exist on the Node1
[root@node1 ~]# git clone git:nanwei/perlv2cart.git

step 2
Add cartridge with manifest.yml to an app in the broker
# rhc app create ppl https://raw.github.com/nanwei/perlv2cart/master/metadata/manifest.yml
# wget https://raw.github.com/nanwei/perlv2cart/master/metadata/manifest.yml; cat manifest.yml
<--snip-->
Source-Url: file:///root/perlv2cart/
<--snip-->

Actual results:
Creating application 'ppl' ... 
Unable to complete the requested operation due to: '23_wsuntest' does not match
pattern /\A[a-z][a-z0-9_]*\z/.: 'Cartridge-Vendor'.
Reference ID: 08fbbf5eff1cbb55fae7f5a29f3066b4

Comment 4 Luke Meyer 2014-01-07 11:32:17 UTC
That's a different error - invalid cartridge-vendor because it doesn't begin with a letter.

Also note that the cartridge has to be present on *all* nodes where a gear using this cartridge could ever be created.

If getting cartridge from /root the node will probably be blocked by SElinux permissions anyway (there's another bug open regarding that); I'd suggest either cloning it next to the other cartridges or ensuring that it has the same context.

Comment 5 Nan Wei 2014-01-08 08:27:21 UTC
Openshift Enterprise: 2014-01-07.2

step 1
does file:///root/perlv2cart/ actually exist on the Node1
[root@node1 ~]# git clone git:nanwei/perlv2cart.git

step 2
Add cartridge with manifest.yml to an app in the broker
# rhc app create pl https://raw.github.com/nanwei/perlv2cart/master/metadata/manifest.yml
# wget https://raw.github.com/nanwei/perlv2cart/master/metadata/manifest.yml; cat manifest.yml
<--snip-->
Source-Url: file:///root/perlv2cart/
<--snip-->

Actual results:
App create successfully.

I have a try with the php download cartridge and it is created successfully. Sorry, I can't reproduce the issue as before.