Red Hat Bugzilla – Bug 1130362
app-stop can not stop all process in pyhton app with 'app.py' after start it twice
Last modified: 2016-07-03 20:44:56 EDT
Description of problem: When file 'app.py' exists, the stop action can't kill the 'python app.py' process after start it twice. Version-Release number of selected component (if applicable): puddle [2.1.z/2014-08-13.1] How reproducible: 100% Steps to Reproduce: 1. Create a pyhon app #rhc app create ajeamkpi python-3.3 mongodb-2.4 --from-code https://github.com/openshift-quickstart/Bottle-Python3-quickstart 2.Start the app twice #rhc app start ajeamkpi 3. Stop the app #rhc app stop ajeamkpi 4.access the app Actual results: The app is still accessible Expected results: Can not access the app Additional info: vim python/usr/versions/3.3/bin/control function start_app() ... rm -f $LOGPIPE && mkfifo $LOGPIPE /usr/bin/logshifter -tag python < $LOGPIPE & nohup python -u app.py &> $LOGPIPE & if [ "$?" == "0" ]; then echo $! > $OPENSHIFT_PYTHON_DIR/run/appserver.pid else These code only change the pid in $OPENSHIFT_PYTHON_DIR/run/appserver.pid when start the app for the second time
This does not appear to happen upstream. I suspect it was addressed by the PR in bug 1114477.
Upstream commit: commit 4a567c49eb6a1fae6b11eee9b82fd477fddd1ca7 Author: jhadvig <jhadvig@redhat.com> Date: Mon Jun 30 16:12:03 2014 +0200 Bug 1114477: Incorrect pid written into appserver.pid upon python cartridge start action
Check on puddle [2.1.z/2014-08-25.2] 1. Create a pyhon app #rhc app create ajeamkpi python-3.3 mongodb-2.4 --from-code https://github.com/openshift-quickstart/Bottle-Python3-quickstart 2.Start the app twice #rhc app start ajeamkpi 3. Stop the app #rhc app stop ajeamkpi 4. Access the app The app is not accessible 5. Start the app, access it The app is accessible
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1183.html