openshift / origin-server

OpenShift 2 (deprecated)
888 stars 516 forks source link

[TO_STAGE] Fix pip cache directory permission denied #6430

Closed tiwillia closed 7 years ago

tiwillia commented 8 years ago

This should resolve issue #6390

raditv commented 8 years ago

👍 I hope it will be merged soon

thrasher-redhat commented 8 years ago

[test]

tiwillia commented 8 years ago

Added a python version bump from master.

Also added the previous version to the compatible-version list ONLY for stage to avoid a gear migration. We'll need to come up with a script to run against PROD that creates the $GEAR_HOME/.cache directory for each existing python-2.7 cartridge with the correct selinux contexts and unix permission bits.

tiwillia commented 8 years ago

Lets [test] again with the most recent change please.

openshift-bot commented 8 years ago

Evaluated for online test up to 0a76c197cc3f2e7addb8d2ff303298040d15d5fa

openshift-bot commented 8 years ago

Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests_generic/764/) (Base Commit: 3218c23aaf7e97ca25ef151536724a8a0ab286a0)

sferich888 commented 8 years ago

Does this not work? https://developers.openshift.com/languages/python/getting-started.html#step3

raditv commented 8 years ago

@sferich888 it should work, thank you bro! I'll try it

tiwillia commented 8 years ago

@sferich888 @raditv I don't understand what that blogpost is suggesting that differs from how we are already loading the virtual env. In a python 2.7 cartridge we use the below by default:

virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
    execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
    pass

Its hard to read in the blogpost so maybe I'm reading incorrectly, but the blogpost suggests the exact same thing for python-2.7. The way it is loading the virtenv differently is suggested for python-3.3.

tiwillia commented 7 years ago

I've confirmed with @sferich888 that no known workaround exists, we'll definitely need to get this change in.

wshearn commented 7 years ago

[merge]

openshift-bot commented 7 years ago

Evaluated for online merge up to 0a76c197cc3f2e7addb8d2ff303298040d15d5fa

openshift-bot commented 7 years ago

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests_generic/778/) (Base Commit: f6a9e1875a6c439ec19fabd2f65d510ab23a0fc3) (Image: devenv-stage_1228)