Bug 843015 - Standalone Mysql and Mongodb's .state file can't be changed by restart or start via CLI
Summary: Standalone Mysql and Mongodb's .state file can't be changed by restart or s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-25 10:20 UTC by Rony Gong 🔥
Modified: 2015-05-14 22:57 UTC (History)
2 users (show)

Fixed In Version: devenv_134 and stg
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 20:42:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rony Gong 🔥 2012-07-25 10:20:15 UTC
Description of problem:


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

How reproducible:
always


Steps to Reproduce:
1.Create a scalable app with mongodb embed.
2.In instance, use rhc-idler -u $mongdb_uuid  to idle the mongodb gear
3.Then use: rhc app cartridge start/restart -a qsjbossas -c mongodb-2.0
4.Check $app/runtime/.state in instance
  
Actual results:
cate $app/runtime/.state
idle

Expected results:
start


Additional info:
the .state will be changed only by access the mongodb gear page.

Comment 1 Rony Gong 🔥 2012-07-26 03:04:04 UTC
This error also happened for embed mysql gear.

And if not use rhc-idler -u $gear-id to idle the mongo and mysql gear, the gear state in .state always be "new", it can't be changed by start or stop gear by CLI.

Comment 2 Rony Gong 🔥 2012-08-01 08:08:10 UTC
Since when I doing move test of scalable app (embed mysql and mongo), the move action will check the .state file(always be new now) in the gear repo, It will always let mysql and mongo be running status even if I stopped mysql and mongo gear. Up the priority.

Comment 3 Rob Millner 2012-08-01 18:00:54 UTC
We disabled automatic idling for mysql and mongodb gears; the normal work-flow won't hit this issue.

Comment 4 Rob Millner 2012-08-01 18:39:29 UTC
Re-opening based on it blocking moves.

Comment 5 Rob Millner 2012-08-02 02:27:24 UTC
Pull request:
https://github.com/openshift/crankcase/pull/320

# cat 6969b4012d9f4041adc1e6a2a4e8259a/.env/OPENSHIFT_GEAR_TYPE 
export OPENSHIFT_GEAR_TYPE='mysql-5.1'

# rhc-idler -u 6969b4012d9f4041adc1e6a2a4e8259a 

...
Stopping 6969b4012d9f4041adc1e6a2a4e8259a...
    6969b4012d_ctl.sh                                      [  OK  ]
    6969b4012d_mysql_ctl.sh                                [  OK  ]

# cat 6969b4012d9f4041adc1e6a2a4e8259a/app-root/runtime/.state
idle

$ rhc app cartridge start -a rmtest -c mysql-5.1
Password: ********

RESULT:
Success


# cat 6969b4012d9f4041adc1e6a2a4e8259a/app-root/runtime/.state
started

$ rhc app cartridge stop -a rmtest -c mysql-5.1
Password: ********

RESULT:
Success

# cat 6969b4012d9f4041adc1e6a2a4e8259a/app-root/runtime/.state
stopped


Same with mongodb.

Comment 6 Rob Millner 2012-08-02 03:20:00 UTC
Pull request accepted.

Requesting a hotfix for stg.

Comment 7 Rob Millner 2012-08-02 16:48:57 UTC
Stage pull request accepted.

Comment 8 Rony Gong 🔥 2012-08-03 08:28:23 UTC
verified on stg_228

[root@ip-10-123-77-116 stickshift]# cat a199f9b887c04e509e94de1ff8f601bd/app-root/runtime/.state
idle

then restart mongodb in CLI.

[root@ip-10-123-77-116 stickshift]# cat a199f9b887c04e509e94de1ff8f601bd/app-root/runtime/.state
started


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