g10k
g10k copied to clipboard
Question: Concurrent Cache Access?
Hello,
This is not an issue but more of a general question regarding the cache.
Can I share the cache between concurrent runs? Say I have my control-repo, a bunch of private modules and a bunch of forge modules. Can I run multiple instances of g10k at the same time while using the same cachedir?
I looked quickly at the code and it doesn't seem to be any kind of lock except for mutexes?
Thanks again for all your hard work!
Regards, Mathieu
Yes, you can use the cachedir for multiple parallel g10k runs.
The pure access of the cache isn't problematic at all, but updating the cache in parallel could lead to race conditions, e.g. two g10k runs trying to download or extract the same Puppetlabs Forge archive or git pull the same git repository at the same time.
How does you setup look like? Just one control repo that you specify in a g10k config YAML? How are you calling g10k? With -config or do you use multiple -puppetfile calls at the same time.
My setup and use for g10k is to compile a complete Puppet environment when someone modifies a module to catch as many errors as possible.
So I have:
- one control repo
- Jenkins launching compilation jobs on merge requests
- Jenkins calling g10k with different config files (and thus different Puppetfiles with my link hack)
But yes, they all pull the code from the same control repo, same set of modules and same set of forge modules.