Description of problem: Create app and stop the app via rhc client. Do some changes in the git repo and push it to the server. Check the status of the app from client side, it will say: "Geargroup <cart> is started". Login to the app via ssh can found the service for the framework is not running. Access the app URL via browser, got 503 error. So the app status is actually STOPPED but the .state file changed after git push. Version-Release number of selected component (if applicable): INT(devenv_2417) How reproducible: always Steps to Reproduce: 1.Create app 2.Stop the app 3.Do some change iin the git repo and git push 4.Check the app status via rhc client Actual results: RESULT: Geargroup jbossas-7 is started Expected results: It should show the Geargroup is stopped. Additional info: [bmeng@localhost openshift_testdir]$ rhc app stop jbas1 RESULT: jbas1 stopped [bmeng@localhost jbas1]$ touch 123;git add .;git commit -am test;git push [master d589bdd] test 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 1234 Counting objects: 3, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 239 bytes, done. Total 2 (delta 1), reused 0 (delta 0) remote: restart_on_add=false remote: Application is already stopped remote: Done remote: restart_on_add=false remote: ~/git/jbas1.git ~/git/jbas1.git remote: ~/git/jbas1.git remote: Running .openshift/action_hooks/pre_build remote: Running .openshift/action_hooks/build remote: Running .openshift/action_hooks/deploy remote: hot_deploy_added=false remote: Application is explicitly stopped! Use 'rhc app start -a jbossas-7' to start back up. remote: Done remote: Running .openshift/action_hooks/post_deploy To ssh://ca3edacc01bc49e790e927d2d0d075c5.rhcloud.com/~/git/jbas1.git/ 4ba63c7..d589bdd master -> master [bmeng@localhost jbas1] rhc app show --state jbas1 RESULT: Geargroup jbossas-7 is started
Reducing priority for this release. The bug still exists in production (but takes a slightly different form: the state is incorrect post-build, but is stuck in "deploying" rather than "started"). The problem in the current master branch is in the stop_app function in the abstract cart util: origin-server/cartridges/openshift-origin-cartridge-abstract/abstract/info/lib/util The function does an unconditional "set_app_state started" which doesn't honor any stop_lock which might be present in the gear's cart directories. Unfortunately, this hook is invoked from the abstract start_app.sh script which doesn't provide enough context to easily check the locks, meaning it'll take too much time and testing to sort out this late in the release. So, given the fact that it's not a regression, and that the fix is non-trivial, we're going to lower the priority for now and tackle it in the next release.
Also faild for set app idle first, then gitpush to this app. After gitpush, app is idle actuall, but app status show app is started.
Resolved by https://github.com/openshift/origin-server/pull/992
Checked on devenv_2547, issue has been fixed. Make app stopped or idle before git push, do some change and push it, check the app status again. The status is still keeping idle or stopped. Check the .state file under $OPENSHIFT_REPO_DIR/runtime, it is still keeping idle or stopped. Mark bug as VERIFIED.
Fix broke 'rhc app start...' Fix reverted in https://github.com/openshift/origin-server/pull/1157 No easy solution to problem.
The issue is the code from git push and rhc start use the same function, one requires the state to change while the other does not. The cartridge refactor will not create the same problem.
Jhonce, Can this be fixed before the cartridge refactor?
Note: This is being worked on in v2 and will likely not be valid after that.
Fixed in new cartridge format