hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.26k stars 4.43k forks source link

shell provisioner reboot does not mount SMB synced folders #12711

Open hegyre opened 2 years ago

hegyre commented 2 years ago

Vagrant version

2.2.18

Host operating system

Windows 10 20H2, using Hyper-V as provider and SMB share

Guest operating system

CentOS 7

Vagrantfile

config.vm.synced_folder "salt/", "/srv/salt/"
config.vm.provision "yum_update", type: "shell", path: "update.sh", reboot: true, run: "once"

Expected behavior

/srv/salt/ should be still mounted after the reboot from the shell provisioner.

Actual behavior

/srv/salt/ is not mounted.

Steps to reproduce

vagrant up

References

Are there any other GitHub issues (open or closed) that should be linked here? For example:

jamesooo commented 1 year ago

I was looking in to this after running into it while testing my boxes and it looks like https://github.com/hashicorp/vagrant/blob/main/plugins/provisioners/shell/provisioner.rb#L39C1-L43 may be modified to do something more like a reload operation. I'll try to put together a PR sometime