{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/vagrant/issues/9267","repository_url":"https://api.github.com/repos/hashicorp/vagrant","labels_url":"https://api.github.com/repos/hashicorp/vagrant/issues/9267/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/vagrant/issues/9267/comments","events_url":"https://api.github.com/repos/hashicorp/vagrant/issues/9267/events","html_url":"https://github.com/hashicorp/vagrant/issues/9267","id":281818838,"number":9267,"title":"NFS File Syncing Slower in MacOS High Sierra 10.13.2","user":{"login":"fishfacemcgee","id":1767723,"avatar_url":"https://avatars0.githubusercontent.com/u/1767723?v=4","gravatar_id":"","url":"https://api.github.com/users/fishfacemcgee","html_url":"https://github.com/fishfacemcgee","followers_url":"https://api.github.com/users/fishfacemcgee/followers","following_url":"https://api.github.com/users/fishfacemcgee/following{/other_user}","gists_url":"https://api.github.com/users/fishfacemcgee/gists{/gist_id}","starred_url":"https://api.github.com/users/fishfacemcgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fishfacemcgee/subscriptions","organizations_url":"https://api.github.com/users/fishfacemcgee/orgs","repos_url":"https://api.github.com/users/fishfacemcgee/repos","events_url":"https://api.github.com/users/fishfacemcgee/events{/privacy}","received_events_url":"https://api.github.com/users/fishfacemcgee/received_events","type":"User","site_admin":false},"labels":[{"id":192400390,"url":"https://api.github.com/repos/hashicorp/vagrant/labels/host/darwin","name":"host/darwin","color":"d4c5f9","default":false},{"id":218284866,"url":"https://api.github.com/repos/hashicorp/vagrant/labels/synced-folders/nfs","name":"synced-folders/nfs","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2017-12-13T16:46:28Z","updated_at":"2018-02-28T05:58:03Z","closed_at":null,"author_association":"NONE","body":"Please note that the Vagrant issue tracker is reserved for bug reports and\r\nenhancements. For general usage questions, please use the Vagrant mailing list:\r\nhttps://groups.google.com/forum/#!forum/vagrant-up. Thank you!\r\n\r\nThis is building on top of the handful of comments that popped up at the end of GH-8788. If an issue was already created, I apologize, but I couldn't find one via Issue Search. Also, as with GH-8788, it's entirely possible this is something broken by Apple in MacOS.\r\n\r\n### Vagrant version\r\n`Vagrant 2.0.0`\r\n\r\n### Host operating system\r\n```\r\nuname -a\r\n17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64 i386 MacBookPro11,5 Darwin\r\n```\r\n```\r\nsw_vers -productVersion\r\n10.13.2\r\n```\r\n\r\n### Guest operating system\r\n```\r\ncat /etc/centos-release\r\nCentOS Linux release 7.4.1708 (Core)\r\n```\r\n\r\n### Vagrantfile\r\n```ruby\r\n# -*- mode: ruby -*-\r\n# vi: set ft=ruby :\r\n\r\n# Check vagrant version only on up\r\nif ARGV[0] == \"up\"\r\n    if Gem::Version.new(Vagrant::VERSION) < Gem::Version.new('2.0.0')\r\n      puts \"Warning related to running an old version of Vagrant\"\r\n      exit\r\n    end\r\nend\r\n\r\nVagrant.configure(2) do |config|\r\n    config.vm.box = # Custom CentOS 7 based box\r\n    config.vm.box_url = # Custom Box URL\r\n    config.vm.box_version = \">= 1504287889\"\r\n\r\n    # forward agent for ansible access\r\n    config.ssh.forward_agent = true\r\n\r\n    config.vm.synced_folder \".\", \"/vagrant\", type: \"nfs\"\r\n\r\n    config.vm.provider \"virtualbox\" do |vb|\r\n        # Customize the amount of memory on the VM:\r\n        vb.memory = 3072\r\n        vb.cpus   = 2\r\n    end\r\n\r\n    github_access_check(config)\r\n\r\n    # Ability to override repository URL / branch / tags while provisioning\r\n    provision_url = ENV['PROVISION_URL'] || # custom git repo\r\n    provision_branch = ENV['PROVISION_BRANCH'] || 'master'\r\n    provision_tags = ''\r\n    if ENV['PROVISION_TAGS']\r\n      provision_tags = '--tags ' + ENV['PROVISION_TAGS']\r\n    end\r\n\r\n    # Default vagrant machine configured from master\r\n    config.vm.define \"default\", primary: true, autostart: true do |default|\r\n\r\n        default.vm.network \"private_network\", ip: \"192.168.59.103\",\r\n            nictype: \"virtio\"\r\n\r\n        if Vagrant.has_plugin?(\"vagrant-persistent-storage\")\r\n            hasUpdatedStoragePlugin = Vagrant.has_plugin?(\"vagrant-persistent-storage\", \">= 0.0.22\")\r\n            if hasUpdatedStoragePlugin\r\n                PERSISTENT_STORAGE_LOCATION = File.join(ENV['HOME'], \".vagrant.d/default-web-mysql.vdi\")\r\n            else\r\n                # Keep old file location\r\n                PERSISTENT_STORAGE_LOCATION=File.join(File.dirname(__FILE__), \"\\~/default-web-mysql.vdi\")\r\n            end\r\n            if ARGV[0] == \"up\"\r\n                if hasUpdatedStoragePlugin\r\n                    # Users who started with vagrant-storage-plugin < 0.0.22 and old Vagrantfile\r\n                    oldPersistentStorageFile = File.join(File.dirname(__FILE__), \"\\~/default-web-mysql.vdi\")\r\n                    if File.exists? (oldPersistentStorageFile)\r\n                      move_storage_file(oldPersistentStorageFile, PERSISTENT_STORAGE_LOCATION)\r\n                    end\r\n                    # Users who started with vagrant-storage-plugin = 0.0.22 and old Vagrantfile\r\n                    previousPersistentStorageFile = File.join(ENV['HOME'], \"default-web-mysql.vdi\")\r\n                    if File.exists? (previousPersistentStorageFile)\r\n                      move_storage_file(previousPersistentStorageFile, PERSISTENT_STORAGE_LOCATION)\r\n                    end\r\n                end\r\n            end\r\n\r\n            # Set up persistent /var/lib/mysql that is not destroyed even with vagrant destroy\r\n            default.persistent_storage.enabled = true\r\n            default.persistent_storage.location = PERSISTENT_STORAGE_LOCATION\r\n            default.persistent_storage.size = 5000\r\n            default.persistent_storage.mountname = 'mysql'\r\n            default.persistent_storage.filesystem = 'ext4'\r\n            default.persistent_storage.mountpoint = '/var/lib/mysql'\r\n            default.persistent_storage.volgroupname = 'myvolgroup'\r\n        end\r\n\r\n        # for LiveReload on the front-end\r\n        if Vagrant.has_plugin?(\"vagrant-notify-forwarder\")\r\n            config.vm.network \"forwarded_port\", guest: 35729, host: 35729\r\n        end\r\n\r\n        default.vm.provision \"ansiblervm\", run: \"always\", type: \"shell\", inline: <<-SHELL\r\n            rm -rf ~/.ansible/pull\r\n            PYTHONUNBUFFERED=1 ansible-pull \\\r\n                --url=#{provision_url} \\\r\n                -C #{provision_branch} \\\r\n                #{provision_tags} \\\r\n                -i inventories/localhost \\\r\n                --vault-password-file=/dev/null \\\r\n                # Ansible Playbook\r\n        SHELL\r\n\r\n        # Enable provisioning with a shell script. Additional provisioners such as\r\n        # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the\r\n        # documentation for more information about their specific syntax and use.\r\n        default.vm.provision \"ansible\", run: \"always\", type: \"shell\", inline: <<-SHELL\r\n            rm -rf ~/.ansible/pull\r\n            PYTHONUNBUFFERED=1 ansible-pull \\\r\n                --url=#{provision_url} \\\r\n                -C #{provision_branch} \\\r\n                #{provision_tags} \\\r\n                -i inventories/localhost \\\r\n                --vault-password-file=/dev/null \\\r\n                # Ansible Playbook\r\n        SHELL\r\n    end\r\nend\r\n\r\ndef github_access_check(config)\r\n    config.vm.provision \"github_access_check\", type: \"shell\", inline: <<-SHELL\r\n        ssh -T git@github.com -o StrictHostKeyChecking=no || true\r\n    SHELL\r\nend\r\n\r\ndef move_storage_file(oldLocation, newLocation)\r\n    if File.exists? (oldLocation)\r\n      unless File.exists? (newLocation)\r\n          FileUtils.mv(oldLocation, newLocation) || exit!\r\n          puts \"Moved persistent storage share from: \", oldLocation, \"to: \", newLocation\r\n      else\r\n          puts \"Persistent storage share exists in both old and new location. Please resolve manually\"\r\n          puts \"Old file: \", oldLocation\r\n          puts \"New file: \", newLocation\r\n      end\r\n    end\r\nend\r\n```\r\n\r\nPlease note, if you are using Homestead or a different Vagrantfile format, we\r\nmay be unable to assist with your issue. Try to reproduce the issue using a\r\nvanilla Vagrantfile first.\r\n\r\n### Debug output\r\nhttps://gist.github.com/fishfacemcgee/9bc91d62e00a5f4cf7b1b030dbf37a03\r\n\r\n### Expected behavior\r\nFile changes made on the host machine are synced to the guest machine quickly. On Sierra/HFS+, single file changes are synced immediately (or fast enough to be perceived as immediate).\r\n\r\n### Actual behavior\r\nFile changes take over 20 seconds to sync. Attempting to run `ls` on the file that changed on the guest machine returns the following error:\r\n`ls: cannot access /path/to/file.extension: Input/output error`\r\n\r\n### Steps to reproduce\r\n1. Create a Vagrant machine with NFS sync on High Sierra\r\n2. Modify a file on the Host Machine\r\n3. run `ls -l /path/to/file/on/guest/machine` from within the guest machine\r\n\r\n### References\r\n- GH-8788\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/vagrant/issues/comments/369131148","html_url":"https://github.com/hashicorp/vagrant/issues/9267#issuecomment-369131148","issue_url":"https://api.github.com/repos/hashicorp/vagrant/issues/9267","id":369131148,"user":{"login":"dnl-jst","id":712897,"avatar_url":"https://avatars3.githubusercontent.com/u/712897?v=4","gravatar_id":"","url":"https://api.github.com/users/dnl-jst","html_url":"https://github.com/dnl-jst","followers_url":"https://api.github.com/users/dnl-jst/followers","following_url":"https://api.github.com/users/dnl-jst/following{/other_user}","gists_url":"https://api.github.com/users/dnl-jst/gists{/gist_id}","starred_url":"https://api.github.com/users/dnl-jst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnl-jst/subscriptions","organizations_url":"https://api.github.com/users/dnl-jst/orgs","repos_url":"https://api.github.com/users/dnl-jst/repos","events_url":"https://api.github.com/users/dnl-jst/events{/privacy}","received_events_url":"https://api.github.com/users/dnl-jst/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T05:58:03Z","updated_at":"2018-02-28T05:58:03Z","author_association":"NONE","body":"vboxfs and sshfs are no reasonable way to replace nfs mounts. nfs is much faster when using frameworks like symfony or applications based on symfony like shopware. it's a major performance impact not using nfs in such cases. i hope there will be a fix. imho the problem was introduced by apfs, so it's apples part to fix it. has anyone reported the problem to apple?"}}
{"actor":{"display_login":"dnl-jst"}}