Closed
Bug 564185
Opened 12 years ago
Closed 12 years ago
[amo] File permission problem with pip updates
Categories
(mozilla.org Graveyard :: Server Operations, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jbalogh, Assigned: jbalogh)
Details
I've been seeing this since 12:00pm yesterday: Cron <apache@mradm02> rm -rf /data/virtualenvs/zamboni/build && /data/virtualenvs/zamboni/bin/pip -q install -U -i https://hudson.mozilla.org/pypi/ -r https://hudson.mozilla.org/pypi/pip-manifest.txt > /dev/null Traceback (most recent call last): File "/data/virtualenvs/zamboni/bin/pip", line 3, in <module> sys.exit(pip.main()) File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/pip/__init__.py", line 75, in main return command.main(initial_args, args[1:], options) File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/pip/basecommand.py", line 130, in main log_fp = open_logfile_append(log_fn) File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/pip/basecommand.py", line 182, in open_logfile_append log_fp = open(filename, 'a') IOError: [Errno 13] Permission denied: './pip-log.txt'
Comment 1•12 years ago
|
||
I'll bet the dir is owned by root. It should be owned by apache.
Comment 2•12 years ago
|
||
I'll bet if you cleaned up the cruft left by pip in /tmp, you won't run into these issues again! :)
Assignee: server-ops → shyam
Comment 3•12 years ago
|
||
17G total <- /tmp Wiping it now.
Comment 4•12 years ago
|
||
Looks clean now. I thought the new version of pip (0.7.1) was supposed to clean up after itself.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 5•12 years ago
|
||
I've also chowned the virtualenv to apache, so this should work again.
Comment 6•12 years ago
|
||
Could this just be leftover cruft from an older pip? 0.7.1 includes tests for temporary file cleanup, so I feel somewhat confident it really is cleaning things up now. Also as of pip 0.7 it should be putting the log file in ~/.pip/pip.log so that error seems indicative of an older pip being used.
Comment 7•12 years ago
|
||
Yeah, I misunderstood which box this was happening on.
Assignee | ||
Comment 8•12 years ago
|
||
Traceback (most recent call last): File "/data/virtualenvs/zamboni/bin/pip", line 3, in <module> sys.exit(pip.main()) File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/pip/__init__.py", line 94, in main return command.main(initial_args, args[1:], options) File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/pip/basecommand.py", line 139, in main log_fp = open_logfile(log_fn, 'w') File "/data/virtualenvs/zamboni/lib/python2.6/site-packages/pip/basecommand.py", line 194, in open_logfile os.makedirs(dirname) File "/data/virtualenvs/zamboni/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/var/www/.pip'
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•12 years ago
|
Assignee: shyam → jeremy.orem+bugs
Assignee | ||
Comment 9•12 years ago
|
||
That traceback was from 10:00am.
Comment 10•12 years ago
|
||
$HOME should be set to a writable location (/tmp is fine)
Comment 11•12 years ago
|
||
I opened a ticket in pip too (though I'd recommend just setting $HOME now): http://bitbucket.org/ianb/pip/issue/116/opening-log-file-shouldnt-fail
Assignee | ||
Comment 12•12 years ago
|
||
This is happening once an hour. I don't think it's preview or next. Is it the box that runs cron jobs?
Comment 13•12 years ago
|
||
That's coming from: 0 * * * * rm -rf /data/virtualenvs/zamboni/build && /data/virtualenvs/zamboni/bin/pip -q install -i https://hudson.mozilla.org/pypi/ -r https://hudson.mozilla.org/pypi/pip-manifest.txt > /dev/null You'll just need to export HOME=/tmp in that cronjob.
Assignee: jeremy.orem+bugs → jbalogh
Comment 14•12 years ago
|
||
Not sure if there's any IT action here, closing.
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Comment 15•12 years ago
|
||
Done in http://github.com/jbalogh/zamboni/commit/88b6ee3fed6196cf5cd2796d2bca87ce7ba08c6d The IT action here is to make sure it's using /tmp and not filling up the disk, I guess.
Comment 16•12 years ago
|
||
Looks fine so far.
Updated•8 years ago
|
Product: mozilla.org → mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•