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

Syncing folders isn't working and gem is deprecated #11285

Closed
yuceltoluyag opened this issue Dec 26, 2019 · 6 comments
Closed

Syncing folders isn't working and gem is deprecated #11285

yuceltoluyag opened this issue Dec 26, 2019 · 6 comments

Comments

@yuceltoluyag
Copy link

yuceltoluyag commented Dec 26, 2019

vagrant -v
Vagrant 2.2.6
 vagrant provision
NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /opt/vagrant/embedded/gems/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428.
NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /opt/vagrant/embedded/gems/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428.

Host operating system

Arch Linux
Linux jason 5.4.6-arch3-1 #1 SMP PREEMPT Tue, 24 Dec 2019 04:36:53 +0000 x86_64 GNU/Linux

Guest operating system

Virtualbox

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path(File.dirname(__FILE__))

homesteadYamlPath = confDir + "/Homestead.yaml"
homesteadJsonPath = confDir + "/Homestead.json"
afterScriptPath = confDir + "/after.sh"
customizationScriptPath = confDir + "/user-customizations.sh"
aliasesPath = confDir + "/aliases"

require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb')

Vagrant.require_version '>= 2.2.4'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    if File.exist? aliasesPath then
        config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases"
        config.vm.provision "shell" do |s|
            s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases && chown vagrant:vagrant /home/vagrant/.bash_aliases"
        end
    end

    if File.exist? homesteadYamlPath then
        settings = YAML::load(File.read(homesteadYamlPath))
    elsif File.exist? homesteadJsonPath then
        settings = JSON::parse(File.read(homesteadJsonPath))
    else
        abort "Homestead settings file not found in #{confDir}"
    end

    Homestead.configure(config, settings)

    if File.exist? afterScriptPath then
        config.vm.provision "shell", path: afterScriptPath, privileged: false, keep_color: true
    end

    if File.exist? customizationScriptPath then
        config.vm.provision "shell", path: customizationScriptPath, privileged: false, keep_color: true
    end

    if Vagrant.has_plugin?('vagrant-hostsupdater')
        config.hostsupdater.remove_on_suspend = false
        config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] }
    elsif Vagrant.has_plugin?('vagrant-hostmanager')
        config.hostmanager.enabled = true
        config.hostmanager.manage_host = true
        config.hostmanager.aliases = settings['sites'].map { |site| site['map'] }
    end

    if Vagrant.has_plugin?('vagrant-notify-forwarder')
        config.notify_forwarder.enable = true
    end
end

Debug output

https://gist.github.com/yuceltoluyag/9c5b757e92377dfb9bc4101655178f53

file sync does not work

@eihli
Copy link

eihli commented Jan 2, 2020

I experienced something similar. I ran vagrant up for the first time in a few weeks, saw the same deprecation warning, and then realized my synced_folders weren't available.

At first, I missed some of the output from my vagrant up command. After I encountered the problem, I looked through my history and noticed this.

==> default: Mounting shared folders...
    default: /home/vagrant/lottery => /home/eihli/code/lottery
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 home_vagrant_lottery /home/vagrant/lottery

The error output from the command was:

: No such device

I'm still not sure what caused that, but I did recall that in the time between the previous successful vagrant up and the most recent failed vagrant up, I ran sudo pacman -Syu and had a fairly big update. Last time there I had such a big update, I remember having some issues that required a restart.

I ran a vagrant destroy, vagrant update, and vagrant up, and things are back to working.

@briancain
Copy link
Member

Hey there @yuceltoluyag - Are you running Vagrant from source, or from a third party package? Those warnings seem to be caused by the latest Ruby via #11290. Currently, Vagrant does not support Ruby 2.7.x and we recommend being on Ruby 2.6.x, as it does not have the issue described in the GH issue I linked to. Also, do you experience this issue when not using Homestead? Homestead is a different project, so if you can reproduce this issue with a minimal Vagrantfile, that will be easier for us to help you solve your issue. Thanks!

@yuceltoluyag
Copy link
Author

system ruby version
ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]

I don't use any plugin. I'm using the vagrant up command directly

@briancain no problem synchronizing right now,only this part looks like notification

NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /opt/vagrant/embedded/gems/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428.
NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /opt/vagrant/embedded/gems/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428.

@briancain
Copy link
Member

@yuceltoluyag - Aahh ok, so you're just experiencing the warnings? If that's the case, please close this issue, as it is a duplicate of #11290. Thanks!

@yuceltoluyag
Copy link
Author

okay comrade @briancain ( ͡° ͜ʖ ͡°)

@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants