New issue
Advanced search Search tips

Issue 843291 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-06-04
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

vpython: Make the location of .vpython_cipd_cache configurable (like .vpython-root is)

Project Member Reported by bpastene@chromium.org, May 15 2018

Issue description

It seems vpython will attempt to create 2 dirs at run-time, .vpython-root and .vpython_cipd_cache.

The location of .vpython-root can be configured via a cmd-line arg or env var:
https://codesearch.chromium.org/chromium/infra/go/src/go.chromium.org/luci/vpython/application/application.go?rcl=3c7067507989e558bc88a523ff2fff6f6c4266bb&l=46

However, .vpython_cipd_cache seems to be hard coded under the home dir and can't be told to go elsewhere. This is problematic because for some platforms (eg cros), the home dir isn't necessarily writable. For instance, I'm seeing this failure:

localhost /usr/local/tmp/bpastene # VPYTHON_VIRTUALENV_ROOT=/tmp ./vpython
[E2018-05-15T12:23:32.498188-07:00 7129 0 client.go:1431] Failed to install infra/python/virtualenv:d7fe4ca0377e894777e4f0a4d10defc600baf537 - mkdir /root/.vpython_cipd_cache: read-only file system
[E2018-05-15T12:23:32.498726-07:00 7129 0 annotate.go:242] original error: failed to update packages, see the log
[E2018-05-15T12:23:32.498771-07:00 7129 0 annotate.go:242] 
[E2018-05-15T12:23:32.498796-07:00 7129 0 annotate.go:242] goroutine 1:
[E2018-05-15T12:23:32.498816-07:00 7129 0 annotate.go:242] #0 go.chromium.org/luci/cipd/client/cipd/client.go:122 - cipd.init()
[E2018-05-15T12:23:32.498849-07:00 7129 0 annotate.go:242] #1 go.chromium.org/luci/vpython/./<autogenerated>:1 - cipd.init()
[E2018-05-15T12:23:32.498865-07:00 7129 0 annotate.go:242] #2 ./<autogenerated>:1 - main.init()
[E2018-05-15T12:23:32.498884-07:00 7129 0 annotate.go:242] #3 runtime/proc.go:186 - runtime.main()
[E2018-05-15T12:23:32.498899-07:00 7129 0 annotate.go:242]   annotation #0:
[E2018-05-15T12:23:32.498918-07:00 7129 0 annotate.go:242]     reason: failed to create new VirtualEnv
[E2018-05-15T12:23:32.498932-07:00 7129 0 annotate.go:242]   annotation #1:
[E2018-05-15T12:23:32.498946-07:00 7129 0 annotate.go:242]     reason: failed to download packages
[E2018-05-15T12:23:32.498960-07:00 7129 0 annotate.go:242]   annotation #2:
[E2018-05-15T12:23:32.498978-07:00 7129 0 annotate.go:242]     reason: failed to download packages
[E2018-05-15T12:23:32.498994-07:00 7129 0 annotate.go:242]   annotation #3:
[E2018-05-15T12:23:32.499017-07:00 7129 0 annotate.go:242]     reason: failed to install CIPD packages
[E2018-05-15T12:23:32.499046-07:00 7129 0 annotate.go:242] 
[E2018-05-15T12:23:32.499066-07:00 7129 0 annotate.go:242] #4 runtime/asm_amd64.s:2361 - runtime.goexit()
 
Labels: -Type-Bug Type-Feature
NextAction: 2018-06-04
Status: Available (was: Untriaged)
Your request seems reasonable to me.

Given that this is currently Pri3 (and I have many Pri1s) && Robbie has way more understanding, I postpone acting on this FR until either Robbie gets to provide input or priority of this increases.
Try setting CIPD_CACHE_DIR env var, maybe vpython respects it (cipd client does).
Setting CIPD_CACHE_DIR did the trick, thanks Vadim. Though it ends up nuking vpython's pardir if it's in the same dir as CIPD_CACHE_DIR. Or something... I don't really understand what was happening. I'll just have to be careful with the paths I choose.
The NextAction date has arrived: 2018-06-04
Cc: iannucci@chromium.org
Cc: iannu...@google.com
Cc: -iannucci@chromium.org

Sign in to add a comment