Add mount_options option. #68
Conversation
fgrehm
commented on the diff
Dec 13, 2013
| @@ -18,7 +18,13 @@ def call(env) | ||
| FileUtils.mkdir_p(cache_root.to_s) unless cache_root.exist? | ||
| nfs_flag = env[:machine].config.cache.enable_nfs | ||
| - env[:machine].config.vm.synced_folder cache_root, '/tmp/vagrant-cache', id: "vagrant-cache", nfs: nfs_flag | ||
| + mount_options = env[:machine].config.cache.mount_options | ||
| + | ||
| + if mount_options |
fgrehm
Owner
|
|
And BTW, the plugin works fine for vagrant-libvirt? If that's the case we can add it to the compatible providers list |
purpleidea
commented
Dec 18, 2013
|
@fgrehm Sorry for my late reply. So far it seems to (I think). There's at least one reasonably bad bug, but I can't reproduce it reliably yet. Basically what happens is when you provision a host, you'll get a permission denied error on /tmp/vagrant-cache/yum Should probably be another bug, but I've been busy. Also, tell me if you like this vagrantfile hack (the no-parallel). Technically there could still be an issue, but it's less risky. Which is why I hacked it in, and didn't patch it upstream: #
# cache
#
# TODO: this doesn't cache metadata, full offline operation not possible
config.cache.auto_detect = true
config.cache.enable :yum
#config.cache.enable :apt
if not ARGV.include?('--no-parallel') # when running in parallel,
config.cache.scope = :machine # use the per machine cache
end
config.cache.enable_nfs = true # sets nfs => true on the synced_folder
# the nolock option is required, otherwise the NFSv3 client will try to
# access the NLM sideband protocol to lock files needed for /var/cache/
# all of this can be avoided by using NFSv4 everywhere. die NFSv3, die!
config.cache.mount_options = ['rw', 'vers=3', 'tcp', 'nolock']
Also it would be cool if there was a way to preemptively pre-warm the future hosts... Eg: hardlink over into the respective machine dirs any .rpm's. You could do this if :machine set, and for the list of machines in vagrant status. |
purpleidea
commented
Dec 21, 2013
|
@fgrehm ping? |
purpleidea
commented
Jan 9, 2014
|
ping ping? |
purpleidea
added a commit
to purpleidea/puppet-gluster
that referenced
this pull request
Jan 21, 2014
|
|
purpleidea |
34c649c
|
purpleidea
added a commit
to purpleidea/puppet-gluster
that referenced
this pull request
Jan 21, 2014
|
|
purpleidea |
bee4993
|
|
@purpleidea sorry for the silence, I've been on vacations and pretty much offline from github for a while, but I'm back in action and cachier is my current focus :-) expect some progress on it soonish |
purpleidea
commented
Jan 28, 2014
|
On Tue, Jan 28, 2014 at 4:48 PM, Fabio Rehm notifications@github.com wrote:
Great! I had assumed you got abducted by a competing caching product! |
|
@purpleidea I'm finally getting to this, sorry for taking so long to get back to you. After some thinking and looking around I realized that GH-78 allow us to implement this in a more general way making things future proof down here. Please see my comments over there to better understand my decision on closing this PR. Thanks for putting this up and stay tuned for updates, if all goes well I'll be able to cut a new release over the weekend. |
purpleidea commentedDec 10, 2013
This option can be very useful with the existing enable_nfs option to
choose a different protocol like tcp (udp is the default), and to add
other nfs options like nolock.