Bug 1127643

Summary: Newly created app show gears default to small which is cloned from existing non-small gear app
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jokerman, mmccomas
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: 2015-02-18 16:50:36 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 Liang Xia 2014-08-07 09:47:49 UTC
Description of problem:
Given a medium gear size app is created. Create a new app from this app.
Check the newly created app, gear size of the newly created app show default to small.

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

How reproducible:
always

Steps to Reproduce:
1.Create a medium gear size app.
$ rhc create-app apporigin diy-0.1 -g medium --no-git
2.Create a new app from above app.
$ rhc create-app appclone --from-app apporigin
3.Check the newly created app.

Actual results:
Newly create app show gears default to small.

$ rhc show-app apporigin ; rhc show-app appclone
apporigin @ http://apporigin-lxia.dev.rhcloud.com/ (uuid: 53e36320a750643728000154)
-------------------------------------------------------------------------
  Domain:     lxia
  Created:    7:29 PM
  Gears:      2 (defaults to medium)
  Git URL:    ssh://53e36320a750643728000154.rhcloud.com/~/git/apporigin.git/
  SSH:        53e36320a750643728000154.rhcloud.com
  Deployment: manual (use 'rhc deploy')
  Aliases:    apporigin.alias
  haproxy-1.4 (Web Load Balancer)
  -------------------------------
    Gears: Located with php-5.4, cron-1.4
  php-5.4 (PHP 5.4)
  -----------------
    Scaling: x2 (minimum: 2, maximum: 5) on medium gears
appclone @ http://appclone-lxia.dev.rhcloud.com/ (uuid: 53e3683da750647498000142)
---------------------------------------------------------------------------
  Domain:     lxia
  Created:    7:51 PM
  Gears:      2 (defaults to small)
  Git URL:    ssh://53e3683da750647498000142.rhcloud.com/~/git/appclone.git/
  SSH:        53e3683da750647498000142.rhcloud.com
  Deployment: manual (use 'rhc deploy')
  haproxy-1.4 (Web Load Balancer)
  -------------------------------
    Gears: Located with cron-1.4, php-5.4
  php-5.4 (PHP 5.4)
  -----------------
    Scaling: x2 (minimum: 2, maximum: 5) on medium gears

Expected results:
Show correct gear size for the cloned app.

Additional info:
The newly created app is actually using medium gear.

Comment 1 openshift-github-bot 2014-10-28 18:45:05 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/e2e58717e96393acaed54c8eefea5e7ed7f075a2
Bug 1127643 - must copy gear_profile on main app (not only cartridges) when cloning app

Comment 2 Fabiano Franz 2014-10-28 18:49:02 UTC
Fixed in master.

Comment 3 Liang Xia 2014-10-29 05:28:13 UTC
Verified on devenv_5270 with rhc 1.32.0 (both scaling and non-scaling apps), the issue has been fixed.

# rhc app show apporigin ; rhc app show appclone
apporigin @ http://apporigin-lxia.dev.rhcloud.com/ (uuid: 5450a7ab9130e095d700008f)
-------------------------------------------------------------------------------
  Domain:     lxia
  Created:    4:39 AM
  Gears:      1 (defaults to medium)
  Git URL:    ssh://5450a7ab9130e095d700008f.rhcloud.com/~/git/apporigin.git/
  SSH:        5450a7ab9130e095d700008f.rhcloud.com
  Deployment: auto (on git push)

  diy-0.1 (Do-It-Yourself 0.1)
  ----------------------------
    Gears: 1 medium
appclone @ http://appclone-lxia.dev.rhcloud.com/ (uuid: 5450a7cd9130e095d70000a4)
-------------------------------------------------------------------------------
  Domain:     lxia
  Created:    4:39 AM
  Gears:      1 (defaults to medium)
  Git URL:    ssh://5450a7cd9130e095d70000a4.rhcloud.com/~/git/appclone.git/
  SSH:        5450a7cd9130e095d70000a4.rhcloud.com
  Deployment: auto (on git push)

  diy-0.1 (Do-It-Yourself 0.1)
  ----------------------------
    Gears: 1 medium