Bug 1026447

Summary: The 'ruby' cartridge folder is removed when adding downloadable cartridge to scaled app
Product: OpenShift Online Reporter: Michal Fojtik <mfojtik>
Component: PodAssignee: Lili Nader <lnader>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: dmcphers, jhou, lnader, mfisher, xtian, zzhao
Target Milestone: ---Keywords: UpcomingRelease
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-24 03:28:47 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:
Embargoed:

Description Michal Fojtik 2013-11-04 16:33:05 UTC
Description of problem:

I tried to add my downloadable cartridge to a scaled Ruby 1.9 application and the 'ruby' folder inside the gear was removed after the cartridge was successfully added.
The 'ruby' folder was there before, so I suspect something must remove that folder during the cartridge installation.

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

PROD

Steps to Reproduce:
1. $ rhc app create mon01 ruby-1.9 -s
2. $ rhc ssh --app mon01

* Verify that the 'ruby' folder is there.

3. $ rhc add-cartridge https://raw.github.com/mfojtik/openshift-origin-cartridge-hamonitor/master/metadata/manifest.yml --app mon01

4. $ rhc ssh --app mon01

[mon01-mfojtik.rhcloud.com 5277c2355004465a1400041b]\> ls
app-root  hamonitor

--> The 'ruby' folder is gone.

Actual results:

The 'ruby' folder is removed, the gear is not functional (rhc app stop does not work, etc..)

Expected results:

The cartridge should be added successfully and the 'ruby' primary cartridge should not be removed.

Additional info:

Please note, that the downloadable cartridge could be wrong (manifest.yml, bin/scripts...), but this should not happen regardless how bad the cartridge is ;-)

Comment 1 Dan Mace 2013-11-04 18:24:15 UTC
Following the same steps in devenv_3984, I got even more serious behavior. During the `add-cartridge` call, the broker sends an `app-create` action to the node (equivalent to that which was used to create the app initially), which fails (due to the uuid/gear already existing), causing a subsequent rollback/app-delete from the broker, deleting the app entirely.

Looks like the broker is not sending the correct action to the node (and in this case should likely invalidate the user request to begin with since the app already contains a web_proxy cart).

Comment 2 Lili Nader 2013-11-05 19:52:37 UTC
It was thought that the downloadable cartridge and hence it conflicted with the haproxy already in place for a scalable app.  However, he manifest does not show a category as web_proxy.  Maybe it was changed in the mean time.  I could not reproduce the bug.

Comment 3 Lili Nader 2013-11-05 20:40:21 UTC
Added check anyway to send an error back if there is an existing web_proxy and the new cartridge is a web_proxy.


https://github.com/openshift/origin-server/pull/4100

Comment 4 Jianwei Hou 2013-11-06 02:20:13 UTC
Tested on devenv_3993, didn't reproduce this problem again.

Try to add a custom cartridge with web_framwork category, client will show up "You can only have one framework cartridge in your application"