Bug 975349

Summary: Should consistently use the same manifest file while creating app from downloading cartridges
Product: OpenShift Online Reporter: Xiaoli Tian <xtian>
Component: ContainersAssignee: Paul Morie <pmorie>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, pmorie
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-24 14:57: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 Xiaoli Tian 2013-06-18 07:53:08 UTC
Description of problem:
While creating an app from a downloading cartridge manifest file ( call it manifest1, with cartridge name jingperl),  but the Source-Url is targeting to  cartridge sources which also contains another different manifest files ( call it manifest2, with cartridge name wsunperl)

After the app is created, the IDENT value is matching the manifest1
[downloadapp-domx1.dev.rhcloud.com e8dc48fcd7e811e29bd722000aa52913]\> env|grep IDENT
OPENSHIFT_PERL_IDENT=jing:jingperl:5.10:0.0.1

But the manifest file in the gear repo is matching manifest2
[downloadapp-domx1.dev.rhcloud.com jingperl]\> cat metadata/manifest.yml |grep Name
Name: wsunperl
Cartridge-Short-Name: PERL

We should try to keep it consistent,  may replace the manifest file in the gear with the manifest file specified via rhc/web/restapi.


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

How reproducible:
Always

Steps to Reproduce:
1.rhc app-create downloadapp https://raw.github.com/zhangjing1/perlzipv2/master/metadata/manifest.yml (Source-Url in it should point to cartirdge files which contains another different manifest file)

2.rhc app-show downloadapp

3. Check IDENT value
[downloadapp-domx1.dev.rhcloud.com e8dc48fcd7e811e29bd722000aa52913]\> env|grep IDENT
OPENSHIFT_PERL_IDENT=jing:jingperl:5.10:0.0.

4. Check manifest file located in app gear
[downloadapp-domx1.dev.rhcloud.com jingperl]\> cat metadata/manifest.yml |grep Name
Name: wsunperl
Cartridge-Short-Name: PERL

Actual results:
2. # rhc app-show downloadapp
downloadapp @ http://downloadapp-domx1.dev.rhcloud.com/ (uuid: e8dc48fcd7e811e29bd722000aa52913)
------------------------------------------------------------------------------------------------
  Created: 3:30 AM
  Gears:   1 (defaults to small)
  Git URL: ssh://e8dc48fcd7e811e29bd722000aa52913.rhcloud.com/~/git/downloadapp.git/
  SSH:     e8dc48fcd7e811e29bd722000aa52913.rhcloud.com

  jing-jingperl-5.10 (Perl 5.10)
  ------------------------------
    From:  https://raw.github.com/zhangjing1/perlzipv2/master/metadata/manifest.yml
    Gears: 1 small

3. [downloadapp-domx1.dev.rhcloud.com e8dc48fcd7e811e29bd722000aa52913]\> env|grep IDENT
OPENSHIFT_PERL_IDENT=jing:jingperl:5.10:0.0.

4. Check manifest file located in app gear
[downloadapp-domx1.dev.rhcloud.com jingperl]\> cat metadata/manifest.yml |grep Name
Name: wsunperl
Cartridge-Short-Name: PERL


Expected results:
The result in step 2, 3, 4 should keep consistent 

Additional info:

Comment 1 openshift-github-bot 2013-06-19 01:27:46 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/4b1fac284b8374169df9288e47fc5af1a1ed4bdd
Fix bug 975349: always use manifest passed to rhc for downloadable cartridges

Comment 2 Paul Morie 2013-06-19 01:29:54 UTC
Available in devenv 3384.

Comment 3 Xiaoli Tian 2013-06-19 08:13:57 UTC
Found the change is already merged in devenv_3383, so tested it on devenv_3383,

It's fixed now.

After trying to create an app with a downloading cartridges which contains a different manifest file with the manifest file specified in rhc.

The difference between the 2 manifest file:

diff manifest.yml /home/xiaoli/Work/Test/v2cartrepo/test/metadata/manifest.yml 
1c1
< Name: php
---
> Name: php2
10c10
< Cartridge-Vendor: openshift
---
> Cartridge-Vendor: openshiftredhat
47,48c47,48
<   - php-5.3
<   - "php"
---
>   - php2-5.3
>   - "php2"
77c77
<     - php-5.3
---
>     - php2-5.3
92,93c92,93
< #Source-Url: https://github.com/xltian/phptestonly.git
< Source-Url: https://github.com/xltian/phptestonly/raw/master/phptestonly.tar.gz
---
> Source-Url: https://github.com/xltian/phptestonly.git
> #Source-Url: https://github.com/xltian/phptestonly/raw/master/phptestonly3.tar.gz


After the app is created,  the IDENT, gear directory, manifest file located in gear are all match the one specified in rhc
[maniphp1-domxq1.dev.rhcloud.com php]\> env|grep IDENT
OPENSHIFT_PHP_IDENT=openshift:php:5.3:0.0.2
[maniphp1-domxq1.dev.rhcloud.com php]\> cd metadata/
[maniphp1-domxq1.dev.rhcloud.com metadata]\> ls
jenkins_shell_command  managed_files.yml  manifest.yml
[maniphp1-domxq1.dev.rhcloud.com metadata]\> cat manifest.yml |grep Name
Name: php