Bug 967016

Summary: Need better cart dir detection
Product: OpenShift Online Reporter: Dan McPherson <dmcphers>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.xCC: bmeng, yadu
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: 2013-06-11 04:11:10 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 Dan McPherson 2013-05-24 14:13:55 UTC
Description of problem:

Currently it's possible to get and error like:

> > remote: Cartridge manifest not found:
> > /var/lib/openshift/51999049db86250715000002/oradiag_51999049db8625/metadata/manifest.yml
> > missing

When you have extra dirs at the root of a gear that aren't carts.


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


How reproducible:


Steps to Reproduce:
1. Create an app
2. ssh to the system as root and add a dir at the root of the gear
3. ssh to the system as the user and call gear stop

Actual results:
Will get an error similar to the above

Expected results:
Should ignore the extra dir

Additional info:

Comment 1 Dan Mace 2013-05-24 19:29:10 UTC
Resolved by https://github.com/openshift/origin-server/pull/2636

Comment 2 openshift-github-bot 2013-05-24 22:52:02 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b7062da3a8bc8da611b32b9ce78ca47ee55cf0d4
Bug 967016: Detect v2 carts in a gear more accurately

Comment 3 Meng Bo 2013-05-27 09:40:37 UTC
Verified on devenv_3277

1. Create php app
2. Add mysql to the app
3. Add testdir into the gear home
4. SSH login to the gear via user
$rhc ssh php1

[php1-bmengdev1.dev.rhcloud.com 51a326eaeaf28e745c000013]\> ls -Z
drwxr-xr-x. root                     51a326eaeaf28e745c000013 system_u:object_r:openshift_var_lib_t:s0:c0,c505 app-root
drwxr-xr-x. root                     root                     system_u:object_r:openshift_var_lib_t:s0 git
drwxr-xr-x. 51a326eaeaf28e745c000013 51a326eaeaf28e745c000013 system_u:object_r:openshift_var_lib_t:s0:c0,c505 mysql
drwxr-xr-x. 51a326eaeaf28e745c000013 51a326eaeaf28e745c000013 system_u:object_r:openshift_var_lib_t:s0:c0,c505 php
drwxr-xr-x. 51a326eaeaf28e745c000013 51a326eaeaf28e745c000013 system_u:object_r:openshift_var_lib_t:s0:c0,c505 testdir

[php1-bmengdev1.dev.rhcloud.com 51a326eaeaf28e745c000013]\> ctl_all restart
Stopping services
Stopping gear...
Stopping PHP cart
[Mon May 27 05:31:00 2013] [warn] module php5_module is already loaded, skipping
Starting services
Starting gear...
Starting PHP cart
[Mon May 27 05:31:12 2013] [warn] module php5_module is already loaded, skipping

[php1-bmengdev1.dev.rhcloud.com 51a326eaeaf28e745c000013]\> ctl_app restart
Cart to restart?
1. php-5.3
2. mysql-5.1
?  3
You must choose one of ["1", "2", "php-5.3", "mysql-5.1"].
?  1
Restarting PHP cart
[Mon May 27 05:31:49 2013] [warn] module php5_module is already loaded, skipping


The extra dir will be ignored during the ctl_app.

Move bug to verified.