Closed trappar closed 9 years ago
Interesting. What version of vagrant and vagrant-rackspace are you using?
@smashwilson If there is a bug in this plugin there's a good chance it's already fixed by #129, since that removes all the legacy rsync code. I removed the WIP tag. Could you review it one last time and merge?
Vagrant 1.7.2 and vagrant-rackspace 0.1.10.
It appears that Vagrant is ignoring these folders because they already exist
As a temporary.. but really horrible solution I've added this to my Vagrantfile
config.vm.provision :chef_solo do |chef|
chef.provisioning_path = "/tmp/vagrant-chef-#{Time.now.to_i}"
end
By changing the provisioning path on every run, the chef-solo provisioner doesn't find any existing folders and happily rsyncs everything over.
Seems like maybe this is some conflicting code. Like the code preventing syncing is appropriate for other forms of syncing but not at all for rsync? I don't know much about vagrant or vagrant plugin internals so mostly this is just poking around and guessing.
Also, I found that stuff by doing vagrant up --debug
and vagrant provision --debug
, so I know for sure that code I linked to is what's preventing those folders from syncing. I don't know why the main /vagrant
folder continues to sync every time no matter what though.
Yeah, it may make sense for other synced folder types. Some other types are only setup during vagrant up
or vagrant reload
and remain shared as long as the VM is active. At least that's the case for virtualbox shared folders.
That explains virtualbox, and it's likely similar for vmware fusion and parallels, though I'm not sure how they handle synced folders by default. I also suspect that if you forced virtualbox to use rsync synced folders it would have the same bug.
I only see that check in chef-solo, so I suggest reporting it to vagrant as a possible bug in chef solo.
I'd also try out the vagrant rsync or rsync-auto commands, though they might have the same bug. In other words try vagrant rsync && vagrant provision
as see if that works as an alternative workaround to changing your Vagrantfile.
When I did vagrant up
with the box centos/7 (virtualbox, 1703.01)
, ==> default: Rsyncing folder: /root/ => /vagrant
was stuck for me too, and adding
config.vm.synced_folder '.', '/vagrant', disabled: true
in Vagrantfile resolved the issue for me and rsync did not happen.
Not sure if this is a vagrant-rackspace issue or a vagrant-berkshelf issue...
When running
vagrant up
I see the following lines in the output:Then when running
vagrant provision
I get:The berkshelf one is quite necessary, since that's where the policy code lives and is executed from. The result of this is that I can provision correctly on vagrant up, but then any further changes to my policy code will never be synced with the server.
This works fine on providers other than the rackspace provider (virtualbox, vmware fusion/workstation, parallels), which is why I suspect it's an issue with this plugin.