Description
Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!
Vagrant version
$ vagrant -v
Vagrant 1.9.7
Host operating system
$ uname -a
Darwin liver.local 17.0.0 Darwin Kernel Version 17.0.0: Thu Jun 29 19:47:09 PDT 2017; root:xnu-4532.0.0.0.1~23/RELEASE_X86_64 x86_64
$ sw_vers -productVersion
10.13
Guest operating system
$ uname -a
Linux vagrant 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
## Check dependencies
# vagrant version
Vagrant.require_version ">= 1.7.0"
# vagrant-triggers plugin
if !Vagrant.has_plugin?("vagrant-triggers")
puts "The 'vagrant-triggers' plugin is required, install it with the following command:"
puts " vagrant plugin install vagrant-triggers"
exit
end
# vagrant-bindfs plugin
if !Vagrant.has_plugin?("vagrant-bindfs")
puts "The 'vagrant-bindfs' plugin is required, install it with the following command:"
puts " vagrant plugin install vagrant-bindfs"
exit
end
Vagrant.configure("2") do |config|
# General configuration, valid for all defined boxes.
# Virtualbox tweaks.
config.vm.provider :virtualbox do |vb|
# Moar memory
vb.customize ["modifyvm", :id, "--memory", "2048"]
# allow symlinks
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
end
# NFS shares
config.vm.synced_folder "www", "/var/www", type: "nfs"
config.vm.synced_folder "db", "/home/vagrant/db", :nfs => true
config.vm.synced_folder "scripts", "/home/vagrant/scripts", :nfs => { :mount_options => ["mfsymlinks"] }
#config.vm.synced_folder "www", "/home/vagrant/www", type: "nfs"
#config.bindfs.bind_folder "/home/vagrant/www", "/var/www", owner: "vagrant", group: "vagrant", perms: "0777"
# https/ssl port forwarding
config.vm.network :forwarded_port, guest: 443, host: 4444
# SSH
config.ssh.shell = "BASH_ENV=/etc/profile bash -l"
## Provision
# setup.sh will run to provide additional provisioning, see script for details
config.vm.provision :shell, :inline => "
/vagrant/scripts/setup.sh;
"
## Triggers
# cleanup actions that will run on 'destroy'
config.trigger.before :destroy do
for script in Dir.glob("scripts/cleanup/*")
begin
answer = ''
info("Do you want to execute the '#{script}' cleanup script'? [Y/n] ")
Timeout::timeout(5) { answer = $stdin.gets }
rescue Timeout::Error
answer = 'y'
end
if answer == 'Y' or answer == 'y'
run "vagrant ssh -c 'sh #{script}'"
end
end
end
# the box
config.vm.define :vagrant do |vagrant|
vagrant.vm.network :private_network, ip: "192.168.50.2"
vagrant.vm.hostname = "vagrant.loc"
end
end
if File.file?('Vagrantfile.box')
load 'Vagrantfile.box'
end
Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.
Debug output
https://gist.github.com/Yaroon/dcb20eb984669688746767b0342c7d55
Expected behavior
I should see all folders that in the NFS share.
I shouldn't see folders doubly in the NFS share.
Actual behavior
I do not see the TypedData folder.
I see Field and Breadcrumb folder twice.
Steps to reproduce
- You can try installing Drupal 8.3 on your host.
- Then set up Vagrant file so that the www folder gets shared to the guest OS's /var/www
- Check out /var/www/core/lib/Drupal/Core and you'll see some folders differently from the host OS.
Additionally you can check out a screencast I did that illustrates the problem.
You can see how the folder is an NFS folder at first. You can see Breadcrumb and Field appearing twice on the guest OS while TypedData does not. When I then create a folder "WhateverOtherData" it gets synced between host and guest. However TypedData and Field and Breadcrumb are still there twice. When I then create a folder StringData, all of a sudden TypedData appears on the guest and we only see 1 Breadcrumb and 1 Field folder. So something got triggered to fix it... I just don't know what.
https://www.dropbox.com/s/ykdi1cp5v689sq0/Vagrant%20%2B%20NFS%20%2B%20macOS%20High%20Sierra.mov?dl=0
Activity