Fix Ubuntu 24.04 shutdown hang with synced folders#13804
Conversation
|
@taru-garg-hashicorp friendly ping |
|
@taru-garg-hashicorp would you take a look at this PR? |
|
Hi @giner, |
|
Hi @giner , Not sure why the tests have not run, I tried looking around in github but couldn't find any re-trigger, wondering if you could do a push without any edits to trigger the tests Thanks |
Fix Ubuntu 24.04 shutdown hang by preventing vagrant from mounting already mounted synced folders. Fixes hashicorp#13795. Before: ``` vagrant ssh mount | grep vagrant vagrant on /vagrant type vboxsf (rw,nodev,relatime,iocharset=utf8,uid=1000,gid=1000) vagrant on /vagrant type vboxsf (rw,nodev,relatime,iocharset=utf8,uid=1000,gid=1000,_netdev) exit time vagrant halt ==> default: Attempting graceful shutdown of VM... ==> default: Forcing shutdown of VM... real 1m5.500s user 0m3.900s sys 0m4.279s ``` After: ``` vagrant ssh mount | grep vagrant vagrant on /vagrant type vboxsf (rw,nodev,relatime,iocharset=utf8,uid=1000,gid=1000,_netdev) exit time vagrant halt ==> default: Attempting graceful shutdown of VM... real 0m5.210s user 0m1.657s sys 0m0.966s ```
1a8c8b5 to
cf21f45
Compare
|
@taru-garg-hashicorp pushed |
There was a problem hiding this comment.
Pull request overview
Fixes duplicate VirtualBox synced-folder mounts on Linux guests by skipping mount attempts when the target guest path is already mounted, addressing Ubuntu 24.04 shutdown hangs caused by duplicate /vagrant mounts.
Changes:
- Adds a Linux VirtualBox synced-folder mountpoint check before invoking
mount. - Adds unit coverage for the already-mounted path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb |
Skips mounting when the guest path is already a mountpoint. |
test/unit/plugins/guests/linux/cap/mount_virtual_box_shared_folder_test.rb |
Verifies no mount command is run for an already-mounted guest path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix Ubuntu 24.04 shutdown hang by preventing vagrant from mounting already mounted synced folders. Fixes #13795.
Before:
After: