Bug 1030305 - 'rhc app show --state/--gear' shows db gear stop after restore snapshot for scalable app
Summary: 'rhc app show --state/--gear' shows db gear stop after restore snapshot for s...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Vincent Batts
QA Contact: libra bugs
URL:
Whiteboard:
: 1057950 1064040 1071236 (view as bug list)
Depends On:
Blocks: 1062621
TreeView+ depends on / blocked
 
Reported: 2013-11-14 10:28 UTC by Lei Zhang
Modified: 2015-05-14 23:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1062621 (view as bug list)
Environment:
Last Closed: 2014-01-20 23:02:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
status of the cartridges from the web console (39.30 KB, image/png)
2014-01-17 14:53 UTC, Vincent Batts
no flags Details

Description Lei Zhang 2013-11-14 10:28:05 UTC
Description of problem:
Given one scalable app create(e.g., myjbossews20s), embed some db and do save snapshot, and then restore snapshot, found 'rhc app show --state/--gear' show the state of db gear stop not started, but 'rhc cartridge status' shows the status of db gear running. 


+ tmp=/var/lib/openshift/528495f36cec0eb09c00085c/jbossews//tmp
+ '[' -d /var/lib/openshift/528495f36cec0eb09c00085c/jbossews//tmp ']'
+ for d in '$tmp/*'
+ '[' -d '/var/lib/openshift/528495f36cec0eb09c00085c/jbossews//tmp/*' ']'
++ ls /var/lib/openshift/528495f36cec0eb09c00085c/app-root/runtime/repo//webapps
+ '[' '' ']'
Activation status: success
RESULT:
Success
[lijun@ray Work]$ rhc app show --gear -a myjbossews20s
ID                       State   Cartridges               Size  SSH URL
------------------------ ------- ------------------------ ----- ---------------------------------------------------------------------
528495f36cec0eb09c000860 stopped mysql-5.1                small 528495f36cec0eb09c000860.rhcloud.com
528495f36cec0eb09c00086c stopped mongodb-2.2              small 528495f36cec0eb09c00086c.rhcloud.com
528495f36cec0eb09c00085c started jbossews-2.0 haproxy-1.4 small 528495f36cec0eb09c00085c.rhcloud.com
[lijun@ray Work]$ rhc app show --state -a myjbossews20s
Cartridge mysql-5.1 is stopped
Cartridge mongodb-2.2 is stopped
Cartridge jbossews-2.0, haproxy-1.4 is started
[lijun@ray Work]$ rhc cartridge status  -a myjbossews20s -c mysql-5.1
RESULT:
MySQL is running
[lijun@ray Work]$ rhc cartridge status  -a myjbossews20s -c mongodb-2.2
RESULT:
MongoDB is running

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

How reproducible:
always

Steps to Reproduce:
1.create one scalable app
#rhc app create myjbossews20s jbossews-2.0 -s mysql-5.1 mongodb-2.2
2.save snapshot
#rhc snapshot save myjbossews20s
3.restore snapshot and check the gear status 
#rhc snapshot restore -a myjbossews20s -f myjbossews20s.tar.gz
#rhc app show --gear -a myjbossews20s

Actual results:
'rhc app show --state/--gear' shows db gear stop

Expected results:
'rhc app show --state/--gear' should show db gear started

Additional info:

Comment 1 Vincent Batts 2014-01-17 14:53:36 UTC
Created attachment 851649 [details]
status of the cartridges from the web console

so the web console also shows that they're stopped.

Though I see the pids running on the node itself.

1000     19688     1  0 Jan16 ?        00:00:00 /bin/bash /var/lib/openshift/658642806346601025503232/mysql/bin/control post-restore
1000     19693 19688  0 Jan16 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/var/lib/openshift/658642806346601025503232/mysql//conf/my.cnf
1000     19824 19693  0 Jan16 ?        00:00:22 /usr/libexec/mysqld --defaults-file=/var/lib/openshift/658642806346601025503232/mysql//conf/my.cnf --basedir=/usr --datadir=/var/lib/openshift/658642806346601025503232/mysql/data/ --log-error=/var/lib/openshift/658642806346601025503232/mysql//log/mysql_error.log --pid-file=/var/lib/openshift/658642806346601025503232/mysql/pid/mysql.pid --socket=/var/lib/openshift/658642806346601025503232/mysql//socket/mysql.sock
1001     19978     1  0 Jan16 ?        00:01:46 /usr/bin/mongod --auth -f /var/lib/openshift/3087259a7f0611e38d18fe428b6bd8e1/mongodb//conf/mongodb.conf run

Comment 2 Jhon Honce 2014-01-20 23:02:11 UTC
https://trello.com/c/SMPN5PNY

Comment 3 Jhon Honce 2014-01-27 16:53:40 UTC
*** Bug 1057950 has been marked as a duplicate of this bug. ***

Comment 4 Jhon Honce 2014-03-03 15:42:53 UTC
*** Bug 1064040 has been marked as a duplicate of this bug. ***

Comment 5 Jhon Honce 2014-03-03 15:53:39 UTC
*** Bug 1071236 has been marked as a duplicate of this bug. ***

Comment 6 openshift-github-bot 2014-03-14 14:40:50 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/01feb57a151b8829d6900efb2b8d1b05a6b78fdf
Bug 1030305 - 'rhc app show --state/--gear' shows db gear stop after
restore snapshot for scalable app

Given one scalable app create(e.g., myjbossews20s), embed some db and do
save snapshot, and then restore snapshot, found 'rhc app show
--state/--gear' show the state of db gear stop not started, but 'rhc
cartridge status' shows the status of db gear running.

Comment 7 openshift-github-bot 2014-04-02 01:23:46 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/6fd30130f9e969e43be8c69ba3c5ef577854737f
Revert "Card origin_cartridge_133 - Maintain application state across snapshot/restore"

This reverts commit 2b90c5fcf9cee4ddf95dece0546970d7da13780e.

Revert "Bug 1030305 - 'rhc app show --state/--gear' shows db gear stop after"

This reverts commit 01feb57a151b8829d6900efb2b8d1b05a6b78fdf.

Conflicts:
	controller/test/cucumber/step_definitions/application_steps.rb


Note You need to log in before you can comment on or make changes to this bug.