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

"modinfo" not found in $PATH #10170

Closed
deogracia opened this issue Sep 3, 2018 · 5 comments
Closed

"modinfo" not found in $PATH #10170

deogracia opened this issue Sep 3, 2018 · 5 comments
Assignees
Milestone

Comments

@deogracia
Copy link

deogracia commented Sep 3, 2018

Vagrant version

Vagrant 2.1.4

Host operating system

  • lsb_release -a
No LSB modules are available.
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 2.0 (ascii)
Release:	2.0
Codename:	ascii
  • cat /etc/debian_version
9

Guest operating system

Debian 9

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "debian/stretch64"

  config.vm.network "private_network", ip: "192.168.63.10"

  config.vm.synced_folder "/<REDACTED>/national", "/home/vagrant/national", type: "nfs"

  config.vm.provider "virtualbox" do |vb|

    vb.name = "Debian 9 multiusage"
  end

  config.vm.provision "shell", inline: <<-SHELL
    rm /var/lib/apt/lists/* -rf
    apt-get update
    apt-get upgrade -y
    apt-get install -y vim htop curl wget
  SHELL
end

Debug output

https://gist.github.com/deogracia/0b99a3b4b8d06d7218de0fe47c40e531

Expected behavior

  • NFS should be configured
  • VM should be up

Actual behavior

  • vagrant up ends with an error message
  • VM is down

Steps to reproduce

  1. Use devuan
  2. Install Oracle VirtualBox from Oracle website
  3. Install vagrant from vagrantup website
  4. Use a minimal Vagrantfile with a NFS shared directory

References

How I see this issue

  • modinfo lies in /sbin
  • /sbin is in $PATH only for root
  • Given the full path (/sbin/modinfo) of modinfo in plugins/hosts/linux/cap/nfs.rb: everything works fine
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:

  https://www.virtualbox.org/manual/ch04.html#sharedfolders

This option can be disabled globally with an environment variable:

  VAGRANT_DISABLE_VBOXSYMLINKCREATE=1

or on a per folder basis within the Vagrantfile:

  config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
==> default: Mounting shared folders...
    default: /vagrant => /<REDACTED>/debian9
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
  • The warning about SharedFoldersEnableSymlinksCreate is new and didn't occur with vagrant 2.1.2 on chakralinux ( old and different OS crashed last week-end, but I got safe elsewhere)

Thanks for your awesome work everyone :D

@chrisroberts
Copy link
Member

Hi @deogracia!

The quick fix for now is to just add /sbin to your PATH and then things will work as expected. Not sure why modinfo was placed there, but we'll look at adding an exception for the path lookup.

@deogracia
Copy link
Author

Thanks.
For now, I'll keep using vagrant with plugins/hosts/linux/cap/nfs.rb patched. If I see something wrong, I'll rollback and add /sbin in my $PATH.

@deogracia
Copy link
Author

  • still valid in 2.1.5
  • haven't use vagrant a lot since, but so far, so good ( with plugins/hosts/linux/cap/nfs.rb patched)

@chrisroberts chrisroberts added this to the 2.2 milestone Oct 17, 2018
@deogracia
Copy link
Author

  • still valid in 2.2.4

@chrisroberts chrisroberts modified the milestones: 2.2, 2.2.5 Mar 22, 2019
@briancain briancain modified the milestones: 2.2.5, 2.2.6 Jul 10, 2019
@jbonhag jbonhag closed this as completed in 8a69c12 Nov 6, 2019
gitebra pushed a commit to gitebra/vagrant that referenced this issue Nov 7, 2019
* commit '7560c7fdef59132bf80ab5e1ee0a085ed873fc5d':
  Update CHANGELOG
  Fixes hashicorp#10170: Check for modinfo in /sbin (hashicorp#11178)
  Update CHANGELOG
  feedback updates and some style cleanup
  explicitly test the hostname we'll be setting
  website - font and brand updates
@ghost
Copy link

ghost commented Jan 28, 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 Jan 28, 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

4 participants