Bug 1264219 - Python 3.3 Cartridge causes PIP cache errors and won't install requirements.txt dependencies
Python 3.3 Cartridge causes PIP cache errors and won't install requirements.t...
Status: CLOSED NOTABUG
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
2.2.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Timothy Williams
DeShuai Ma
:
Depends On: 1225291
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-17 18:26 EDT by Timothy Williams
Modified: 2015-09-24 14:07 EDT (History)
10 users (show)

See Also:
Fixed In Version: openshift-origin-cartridge-python-1.33.3.1-1.el6op
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1225291
Environment:
Last Closed: 2015-09-24 14:07:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Timothy Williams 2015-09-17 18:26:25 EDT
+++ This bug was initially created as a clone of Bug #1225291 +++

Description of problem:
When using the python-3.3 cartridge, you now get an error regarding PIP cache and won't install anything in requirements.txt file.  Python 2.7 doesn't have this problem.

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


How reproducible:
Easy.


Steps to Reproduce:
1 - rhc app create test33 python-3.3
2 - echo "django" > requirements.txt
3 - git commit -a -m "django"
4 - git push

Actual results:
remote: Activating virtenv
remote: Checking for pip dependency listed in requirements.txt file..
remote: The directory '/var/lib/openshift/55653a9ae0b8cd20c80000a9/.cache/pip/http' or its parent di
rectory is not owned by the current user and the cache has been disabled. Please check the permissio
ns and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
remote: The directory '/var/lib/openshift/55653a9ae0b8cd20c80000a9/.cache/pip/http' or its parent di
rectory is not owned by the current user and the cache has been disabled. Please check the permissio
ns 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/55653a9ae0b8cd20c80000a9/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 b
eing ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, othe
rwise 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
/55653a9ae0b8cd20c80000a9/app-root/runtime/repo/requirements.txt (line 1)) (from versions: )
remote: No matching distribution found for django (from -r /var/lib/openshift/55653a9ae0b8cd20c80000
a9/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 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/55653a9ae0b8cd20c80000a9/app-root/runtime/dependencies/python/vi
rtenv/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/55653a9ae0b8cd20c80000a9/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 671def20
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://55653a9ae0b8cd20c80000a9@test33-compunique.rhcloud.com/~/git/test33.git/
   699274d..46f022b  master -> master
Expected results:


Additional info:

--- Additional comment from Guolei Sun on 2015-05-27 04:38:05 EDT ---

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@test33-gusun.dev.rhcloud.com
  Git remote: ssh://5565800952d42b9d330000ce@test33-gusun.dev.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@test33-gusun.dev.rhcloud.com/~/git/test33.git/
   1b476d5..44d1465  master -> master

--- Additional comment from James Pic on 2015-06-13 18:49:00 EDT ---

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.

--- Additional comment from James Pic on 2015-06-13 18:52:29 EDT ---

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

--- Additional comment from openshift-github-bot on 2015-06-24 05:55:20 EDT ---

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

--- Additional comment from wewang on 2015-06-25 05:28:32 EDT ---

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..
Comment 5 Gaoyun Pei 2015-09-18 03:20:29 EDT
Checked with puddle 2.2/2015-09-15.1, only got openshift-origin-cartridge-python-1.31.3.1-1.el6op.noarch on the env, waiting for openshift-origin-cartridge-python-1.33.3.1-1.el6op to test this bug.
Comment 6 Gaoyun Pei 2015-09-21 05:58:09 EDT
Verify this bug with openshift-origin-cartridge-python-1.33.3.1-1.el6op.noarch.

Create a python-3.3 app, add "django" to the requirements.txt, push the change.

Django could be installed successfully and app is available, move this bug as VERIFIED.
Comment 7 Timothy Williams 2015-09-24 14:07:07 EDT
This was never actually an issue with enterprise, since enterprise never attempted to use the rhcloud.com PyPI mirror to obtain PIP's.

Since this was never actually an issue for this product, closing this bug NOTABUG.

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