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

Shared folder sync hook #4475

Closed
wants to merge 1 commit into from

Conversation

jugglinmike
Copy link
Contributor

In gh-4394, I proposed a general sync action hook that would be triggered
whenever folder synchronization occurred. I've been able to implement the hook
for the rsync mechanism, but I'm not sure how to proceed with the nfs and
smb mechanism.

Ideally, I would want to implement this at some higher level (instead of
extending each mechanism explicitly). Based on my current understanding,
though, it looks like Vagrant isn't generally aware of when sycnhronization
occurs. The more that I look at the code for nfs, the more I think that
Vagrant may not be aware of synchronization for that mechansim at all. If this
is the case, then the proposed sync hook (triggered regardless of
synchronization mechanism) will not be possible.

@mitchellh Would you mind giving me some advice on where to go from here?

This functionality should be duplicated for all official synchronization
methods so that plugin authors can script behavior for these events in a
general way.
@mitchellh
Copy link
Contributor

Hi. Yeah, unfortunately Vagrant doesn't really have a solid grasp on when syncing occurs. I'm not sure this is easily possible to get 100% correct. You could use hooks around the builtin SyncFolders middleware to get a good distance of the way there though.

@mitchellh mitchellh closed this Oct 23, 2014
@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants