Bug 1071236

Summary: Scalable app's db gear state is 'stopped' after restoring snapshot
Product: OpenShift Online Reporter: Wei Sun <wsun>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: abhgupta, ffranz
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-03-03 15:53:39 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 Wei Sun 2014-02-28 10:47:45 UTC
Description of problem:
Try to create a new cloned app based on an existing scalable app(existing app has db cartridge,and db cartridge is started). But after creating the new cloned app successfully,run `rhc app-show $appname --gears`,db gear is stopped.But run `rhc cartridge-status`,it shows '$db is running'.
Try to ssh to app's gear and db gear,could connect db.

Version-Release number of selected component (if applicable):
rhc built from fork_ami_origin_ui_160_1058
fork_ami_origin_ui_160_1058

How reproducible:
Always

Steps to Reproduce:
1.Create a scalable app with db cartridge
2.Create a new scalable cloned app based on above scalable app
3.Check new app's gears state via `rhc app-show --gears`
4.Check new app's db cartridge status via `rhc cartridge-status`
5.Ssh to app's gear to connect db

Actual results:
3.openshift@openshift-ubuntu:~/test$ rhc show-app r9sc --gears
ID                       State   Cartridges           Size  SSH URL
------------------------ ------- -------------------- ----- -----------------------------------------------------------------------------
913299439682770903760896 stopped mongodb-2.4          small 913299439682770903760896.rhcloud.com
531058bbf66ee52700000387 started haproxy-1.4 ruby-1.9 small 531058bbf66ee52700000387.rhcloud.com


Expected results:
DB cartridge status should be shown startted via `rhc app-show --gears`

Additional info:

Comment 1 Fabiano Franz 2014-03-02 04:22:26 UTC
This bug seems to be happening on all snapshot commands and not directly related to rhc. 

After restoring a snapshot on a scalable app with db gears (tested with php-5.4 and mysql-5.5) the db gear is shown 'stopped'. 

Steps to reproduce:

1. rhc create-app <app> php-5.4 mysql-5.5 -s
2. save snapshot: ssh <user>@<app>-<domain>.dev.rhcloud.com snapshot > temp.tar.gz
3. restore snapshot: cat temp.tar.gz | ssh <user>@<app>-<domain>.dev.rhcloud.com 'restore INCLUDE_GIT'
4. display gear state: curl -k --user user:pass https://<host>/broker/rest/application/<app_id>/gear_groups

Comment 2 Fabiano Franz 2014-03-02 04:30:40 UTC
Adding Abhishek, might be worth checking if it's not on broker.

Comment 3 Jhon Honce 2014-03-03 15:53:39 UTC

*** This bug has been marked as a duplicate of bug 1030305 ***