Bug 843015 - Standalone Mysql and Mongodb's .state file can't be changed by restart or start via CLI
Standalone Mysql and Mongodb's .state file can't be changed by restart or s...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-25 06:20 EDT by Rony Gong
Modified: 2015-05-14 18:57 EDT (History)
2 users (show)

See Also:
Fixed In Version: devenv_134 and stg
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-07 16:42:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rony Gong 2012-07-25 06:20:15 EDT
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-25 23:04:04 EDT
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 04:08:10 EDT
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 14:00:54 EDT
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 14:39:29 EDT
Re-opening based on it blocking moves.
Comment 5 Rob Millner 2012-08-01 22:27:24 EDT
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-01 23:20:00 EDT
Pull request accepted.

Requesting a hotfix for stg.
Comment 7 Rob Millner 2012-08-02 12:48:57 EDT
Stage pull request accepted.
Comment 8 Rony Gong 2012-08-03 04:28:23 EDT
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.