Red Hat Bugzilla – Bug 1002471
Changes made to python-3.3 app web pages didn't take effect with hot_deploy marker until manually restart app
Last modified: 2015-05-14 19:27:22 EDT
Description of problem:
Given one python3.3 app created(e.g., mypython33), add hot_deploy and change somthing to the file "wsgi/application" in local git repo, and then git push, found change didn't take effect. After restart mypython33 app, found the change will take effect. python2.7 app does not have this issue.
BTW, there's a card to implement this feature before: https://trello.com/c/BOGls9RY , the SCL python-2.7 works now, but python-3.3 still does not work, not sure if we are going to implement it.
And bug 858601 is closed as not a bug, file this bug to track if we are going to impmement this for python-3.3 or not.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create one python3.3 app
# rhc app create mypytho33 python-3.3
2. Add hot_deploy and change something to wsgi/application file and git push
# touch .openshift/markers/hot_deploy && sed -i 's/Welcome/Hi/g' wsgi/application && git add -A && git commit -amp && git push
3. Access the home page "http://mypython331-ray.stg.rhcloud.com/" and check whether "Welcome to Python-3.3 running on OpenShift " changed into "Hi to Python-3.3 running on OpenShift"
Web page didn't take effect after hot_deploy for python3.3 app
Web page should take effect after hot_deploy for python3.3 app
This is not a function of whether or not the cartridge is using version 2.7 or 3.3. Rather, it is a function of whether or not the application is run as a nonhup python process or a mod_wsgi one.
If you move the 'app.py.disabled' file in the plain 2.7 app created by the cartridge to 'app.py', the 2.7 app will behave just like the 3.3 app does.
More precisely, 2.7 apps makes a decision whether to run as a stand-alone python process or a mod_wsgi based on the presence of 'app.py' in the repo directory: https://github.com/openshift/origin-server/blob/401675f3ac9a6b7585bc21085bf3fa80731508dc/cartridges/openshift-origin-cartridge-python/usr/versions/shared/bin/control#L25-L33
3.3 apps won't do that; it just assumes that 'app.py' is available, and runs as a stand-alone process.
The path forward is to update the 3.3 cartridge so that it uses SCL, and run the application with mod_wsgi when appropriate.
I created a Trello card for this (https://trello.com/c/C3gRDVv2/265-python-3-3-cartridge-from-scl) and therefore close this one.