Bug 1225291
| Summary: | Python 3.3 Cartridge causes PIP cache errors and won't install requirements.txt dependencies | |||
|---|---|---|---|---|
| Product: | OpenShift Online | Reporter: | John M <john> | |
| Component: | Image | Assignee: | Jakub Hadvig <jhadvig> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Wenjing Zheng <wzheng> | |
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 2.x | CC: | gusun, jokerman, jpic, libra-bugs, mmccomas, wewang | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1264219 (view as bug list) | Environment: | ||
| Last Closed: | 2015-07-07 23:49:52 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1264219 | |||
|
Description
John M
2015-05-27 03:36:55 UTC
python2.7 is OK. python3.3 failed as below: ------log------ $ rhc app create test33 python-3.3 Application Options ------------------- Domain: gusun Cartridges: python-3.3 Gear Size: default Scaling: no Creating application 'test33' ... done Waiting for your DNS name to be available ... done Cloning into 'test33'... Warning: Permanently added 'test33-gusun.dev.rhcloud.com' (RSA) to the list of known hosts. Your application 'test33' is now available. URL: http://test33-gusun.dev.rhcloud.com/ SSH to: 5565800952d42b9d330000ce.rhcloud.com Git remote: ssh://5565800952d42b9d330000ce.rhcloud.com/~/git/test33.git/ Cloned to: /home/gusun/feature/app/test33 Run 'rhc show-app test33' for more details about your app. $ cd test33/ $ ls requirements.txt setup.py wsgi.py $ echo "django" > requirements.txt $ cat requirements.txt django $ git commit -a -m "django" [master 44d1465] django 1 file changed, 1 insertion(+) $ git push Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 253 bytes | 0 bytes/s, done. Total 3 (delta 1), reused 0 (delta 0) remote: Stopping Python 3.3 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 44d1465 remote: Activating virtenv remote: Checking for pip dependency listed in requirements.txt file.. remote: The directory '/var/lib/openshift/5565800952d42b9d330000ce/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. remote: The directory '/var/lib/openshift/5565800952d42b9d330000ce/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. remote: Collecting django (from -r /var/lib/openshift/5565800952d42b9d330000ce/app-root/runtime/repo/requirements.txt (line 1)) remote: The repository located at mirror1.ops.rhcloud.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirror1.ops.rhcloud.com'. remote: Could not find a version that satisfies the requirement django (from -r /var/lib/openshift/5565800952d42b9d330000ce/app-root/runtime/repo/requirements.txt (line 1)) (from versions: ) remote: No matching distribution found for django (from -r /var/lib/openshift/5565800952d42b9d330000ce/app-root/runtime/repo/requirements.txt (line 1)) remote: Running setup.py script.. remote: running develop remote: running egg_info remote: creating YourAppName.egg-info remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt remote: writing YourAppName.egg-info/PKG-INFO remote: writing top-level names to YourAppName.egg-info/top_level.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/5565800952d42b9d330000ce/app-root/runtime/dependencies/python/virtenv/venv/lib/python3.3/site-packages/YourAppName.egg-link (link to .) remote: Adding YourAppName 1.0 to easy-install.pth file remote: remote: Installed /var/lib/openshift/5565800952d42b9d330000ce/app-root/runtime/repo remote: Processing dependencies for YourAppName==1.0 remote: Finished processing dependencies for YourAppName==1.0 remote: Preparing build for deployment remote: Deployment id is 80d5d1dc remote: Activating deployment remote: Starting Python 3.3 cartridge (Apache+mod_wsgi) remote: Application directory "/" selected as DocumentRoot remote: Application "wsgi.py" selected as default WSGI entry point remote: ------------------------- remote: Git Post-Receive Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://5565800952d42b9d330000ce.rhcloud.com/~/git/test33.git/ 1b476d5..44d1465 master -> master Confirmed.
Could someone please maybe add this to /etc/pip.conf ?
[global]
trusted-host =
mirror1.ops.rhcloud.com
Thanks, that would fix the Python 3 cartidge which is un-useable right now.
BTW, here's the workaround, add to deploy hook:
source ${OPENSHIFT_HOMEDIR}app-root/runtime/dependencies/python/virtenv/venv/bin/activate
pip install -r ${OPENSHIFT_REPO_DIR}requirements.txt
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/b07ec8b3342ec83276a54d62551b6dc0cf1588ba Bug 1225291 - Python-3.3 cartridge PIP wont install requirements.txt dependencies Verified on devenv-5557 verify steps: Step 1, - rhc app create test33 python-3.3 Step 2, - echo "django" > requirements.txt Step 3, - git commit -a -m "django" Step 4, - git push [root@dhcp-128-91 test33]# git push warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git) Counting objects: 5, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 264 bytes, done. Total 3 (delta 1), reused 0 (delta 0) remote: Stopping Python 3.3 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 1c2ba2f remote: Activating virtenv remote: Checking for pip dependency listed in requirements.txt file.. remote: The directory '/var/lib/openshift/558bc31a14c38ac04100020a/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. remote: The directory '/var/lib/openshift/558bc31a14c38ac04100020a/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. remote: Collecting django (from -r /var/lib/openshift/558bc31a14c38ac04100020a/app-root/runtime/repo/requirements.txt (line 1)) remote: Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/py2.py3/D/Django/Django-1.8.2-py2.py3-none-any.whl (6.2MB) remote: Installing collected packages: django remote: Successfully installed django-1.8.2 remote: Running setup.py script.. |