Bug 1225605 - Django-example quickstart duplicate files
Summary: Django-example quickstart duplicate files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Templates
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-27 18:51 UTC by Chris Ryan
Modified: 2017-05-31 18:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-31 18:22:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chris Ryan 2015-05-27 18:51:32 UTC
Description of problem:
When creating a python-2.7 django quickstart using [1], there are identical ./openshiftlibs.py and ./libs/openshiftlibs.py files. The reference in lib_path in .openshift/action_hooks/secure_db.py points to neither (remote: ImportError: No module named openshiftlibs). It would be good to remove one and update the lib_path in the aciton  hook. The resulting app creation ends in a python traceback, among other errors. 

[1] https://github.com/openshift/django-example

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


How reproducible:
Always

Steps to Reproduce:
1. Create a python-2.7 app from code:
rhc app create django python-2.7
2. Add the repo remote and pull
cd django
git remote add upstream -m master git://github.com/openshift/django-example.git
pull -s recursive -X theirs upstream master
3. git push the app
git push

Actual results:
$git push
Counting objects: 495, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (307/307), done.
Writing objects: 100% (495/495), 197.60 KiB | 0 bytes/s, done.
Total 495 (delta 162), reused 487 (delta 158)
remote: Stopping Python 2.7 cartridge
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Building git ref 'master', commit 98277a4
remote: Activating virtenv
remote: Checking for pip dependency listed in requirements.txt file..
remote: You must give at least one requirement to install (see "pip help install")
remote: Running setup.py script..
remote: running develop
remote: running egg_info
remote: creating YourAppName.egg-info
remote: writing requirements to YourAppName.egg-info/requires.txt
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: reading manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: running build_ext
remote: Creating /var/lib/openshift/5565dbd4607569be4e000009/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/YourAppName.egg-link (link to .)
remote: Adding YourAppName 1.0 to easy-install.pth file
remote: 
remote: Installed /var/lib/openshift/5565dbd4607569be4e000009/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Searching for Django<=1.8
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/Django/
remote: Best match: Django 1.8
remote: Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/source/D/Django/Django-1.8.tar.gz#md5=9a811faf67ca0f3e0d43e670a1cc503d
remote: Processing Django-1.8.tar.gz
remote: Writing /tmp/easy_install-xQGTL6/Django-1.8/setup.cfg
remote: Running Django-1.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xQGTL6/Django-1.8/egg-dist-tmp-duhofj
remote: warning: no previously-included files matching '__pycache__' found under directory '*'
remote: warning: no previously-included files matching '*.py[co]' found under directory '*'
remote: Adding Django 1.8 to easy-install.pth file
remote: Installing django-admin.py script to /var/lib/openshift/5565dbd4607569be4e000009/python/virtenv/bin
remote: Installing django-admin script to /var/lib/openshift/5565dbd4607569be4e000009/python/virtenv/bin
remote: 
remote: Installed /var/lib/openshift/5565dbd4607569be4e000009/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/Django-1.8-py2.7.egg
remote: Finished processing dependencies for YourAppName==1.0
remote: Script /var/lib/openshift/5565dbd4607569be4e000009/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5565dbd4607569be4e000009/python/virtenv/bin/python)
remote: Script /var/lib/openshift/5565dbd4607569be4e000009/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5565dbd4607569be4e000009/python/virtenv/bin/python)
remote: Preparing build for deployment
remote: Deployment id is 1c15e406
remote: Activating deployment
remote: Script /var/lib/openshift/5565dbd4607569be4e000009/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5565dbd4607569be4e000009/python/virtenv/bin/python)
remote: Script /var/lib/openshift/5565dbd4607569be4e000009/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5565dbd4607569be4e000009/python/virtenv/bin/python)
remote: Copying /var/lib/openshift/5565dbd4607569be4e000009/app-root/runtime/repo//wsgi/myproject/db.sqlite3 to /var/lib/openshift/5565dbd4607569be4e000009/app-root/data/
remote: Traceback (most recent call last):
remote:   File "/var/lib/openshift/5565dbd4607569be4e000009/app-root/runtime/repo/.openshift/action_hooks/secure_db.py", line 7, in <module>
remote:     modinfo       = imp.find_module('openshiftlibs', [lib_path])
remote: ImportError: No module named openshiftlibs


Expected results:
There is only one openshiftlibs.py, the lib_path correctly points to it, and there is no ImportError

Additional info:

Comment 1 Chris Ryan 2015-06-05 17:07:39 UTC
Created a fix in https://github.com/openshift/django-example/pull/46, please review. Thanks!

Comment 2 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.


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