Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NFSv4. #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bowlofeggs
Copy link
Contributor

No description provided.

vm.vm.synced_folder "#{dot}", '/vagrant', disabled: disabled, type: 'nfs', nfs_version: 4, nfs_udp: false
else
vm.vm.synced_folder "#{dot}", '/vagrant', disabled: disabled, type: vm_sync # nfs, rsync
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the above code, I wanted to dynamically construct the arguments type, nfs_version, and nfs_udp so I could not have to copy the other parameters. Sadly, my Ruby skills are nonexistent, and I'm coding on an airplane without Internet access for Ruby documentation. In Python, I'd do something like this:

params = {type: 'nfs'}
if vm_sync == "nfs4":
    params['nfs_version'] = 4
    params['nfs_udp'] = False
    function(some_stuff, **params)

If you can tell me how to do that I'll change it.

@purpleidea
Copy link
Owner

Great patch @rbarlow ... I'm tempted to merge this as is, but I'll shoot out a few questions first...

  1. Do the firewall rules change for v4 vs. v3 or is it the same as is.
  2. There are actually two other places that need fixing for sync version I think:

a) Here in your branch at the puppet sync location https://github.com/rbarlow/oh-my-vagrant/blob/nfs4/vagrant/Vagrantfile#L1392

b) In the atomic sync location too: https://github.com/rbarlow/oh-my-vagrant/blob/nfs4/vagrant/Vagrantfile#L986

Lastly, I don't know off hand the answer to your ruby question, but it's a good one, and doing so might make the code more elegant for the two other sync areas... In reading this I did notice that I've used "sync" in at least two places that are in the main loop and should really be "vm_sync" -- so those are bugs :)

Cheers,
James

@purpleidea
Copy link
Owner

@rbarlow Hey awesome patch writer. OMV would love your contribution, got a fresh version for us? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants