openshift / origin-server

OpenShift 2 (deprecated)
889 stars 516 forks source link

Fix pip cache directory permission denied #6414

Closed dinhxuanvu closed 8 years ago

dinhxuanvu commented 8 years ago

For Python 2.7, a new version of PIP (7.1.0) attemps to write into .cache directory in gear's home directory which will cause permission denied error. Users do not have permission to create files or folders in gear's home directory. The .cache directory needs to be created during the installation process. As a result, a piece of code is added to "install" script to create .cache dir before pip install step happens to address the issue.

Bug 1361755 Link https://bugzilla.redhat.com/show_bug.cgi?id=1361755

Signed-off-by: Vu Dinh vdinh@redhat.com

dinhxuanvu commented 8 years ago

@a13m PTAL. Thanks.

dinhxuanvu commented 8 years ago

@tiwillia Please review and merge. Thanks :)

tiwillia commented 8 years ago

I see this properly resolving issues for new gears, since they will call the install method for the python cartridge upon creation. But what about existing gears? Are existing gears affected by the updated PIP version?

dinhxuanvu commented 8 years ago

The existing gears probably have an older version of PIP which will not have this issue. Only new deployment is affected by this.

tiwillia commented 8 years ago

LGTM then. Lets [test][extended:cartridge]

openshift-bot commented 8 years ago

Evaluated for online test up to 53619d51b37b07beb3084682f71fa0d23db7a7e6

openshift-bot commented 8 years ago

Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9377/) (Extended Tests: cartridge)

dinhxuanvu commented 8 years ago

Yay!... Please bless it with a merge tag @tiwillia ... Thanks

tiwillia commented 8 years ago

:clap: :clap: :point_up: :clap: :clap: [merge]

openshift-bot commented 8 years ago

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9378/) (Image: devenv_5817)

openshift-bot commented 8 years ago

Evaluated for online merge up to 53619d51b37b07beb3084682f71fa0d23db7a7e6