3087 Commits

Author SHA1 Message Date
Chris Roberts
21e5913cef Explicitly activate vagrant specification when not activated 2020-03-10 15:08:56 -07:00
Chris Roberts
9336ca5529
Merge pull request #11363 from chrisroberts/enhancement/solutions
Add support for caching solutions. Remove GEMRC modifications.
2020-03-10 14:42:28 -07:00
Chris Roberts
bee56a09df
Merge pull request #11366 from dmitrivereshchagin/fix-curl-invocation
Fix use of -q option in curl invocation
2020-03-09 16:53:12 -07:00
Chris Roberts
351e053aeb Start adding test coverage to bundler class 2020-03-09 16:52:39 -07:00
Chris Roberts
7d44fef00e
Merge pull request #11428 from chrisroberts/fix/windows-reboot
Catch any StandardError exception while waiting for Windows reboot
2020-03-09 16:48:27 -07:00
Chris Roberts
193eb11277
Merge pull request #11427 from chrisroberts/fix/auto-hook-creation
Update dynamic action hooks implementation
2020-03-09 16:46:27 -07:00
Jeff Bonhag
1678cfa757
Fix #11439: Quote each exported directory (#11441)
This commit changes the Darwin NFS template for /etc/exports to put each
exported directory in quotes.

This fixes an issue with directory names that have spaces in them.
Quotes were chosen (rather than escaping the spaces) in order to match
the template for Linux NFS exports.
2020-03-09 16:02:03 -04:00
Chris Roberts
7c2083d5da Update how delayed actions are stored to avoid accessing uninitialized value 2020-03-05 13:25:57 -08:00
Chris Roberts
6f707c829d Catch any StandardError exception while waiting for Windows reboot
This prevents any unexpected connection related error from breaking
the wait loop while windows reboots. If an underlying problem unrelated
to the guest is causing exceptions, the exception will still be raised
to the user, simply after the loop has exceeded the defined maximum
wait time.

Fixes #11238
2020-03-03 17:02:04 -08:00
Chris Roberts
eba18091f9
Merge pull request #11391 from chrisroberts/fix/winrm-server-retry
Update exit code value used for retry check - ArgumentException
2020-03-03 16:26:33 -08:00
Chris Roberts
3686aed72d Add test coverage for dynamic action hook support 2020-03-03 16:23:31 -08:00
Jeff Bonhag
a10b2c3108
Fix #11403: Parse list dhcpservers output on VirtualBox 6.1 (#11404)
This commit creates a custom `read_dhcp_servers` method in the
VirtualBox 6.1 driver to handle changes made in the ouput of
`VBoxManage list dhcpservers`.

Tests for VirtualBox 6.1+ can no longer use the shared examples for the
VirtualBox 4.x driver, because the `read_dhcp_servers` change is not
backwards compatible.

This commit also creates the boilerplate for a VirtualBox 6.x shared
example in case we want to put tests there in the future.
2020-02-18 15:14:31 -05:00
Jeff Bonhag
08c3c741fe
Fix #11396: Use sudo to detect if systemd in use (#11398)
This change allows the vagrant user to see the systemd process in the
event that the hidepid mount option is enabled.

Also adds sudo: true to other tests that use `systemd?`
2020-02-14 12:10:59 -05:00
Chris Roberts
e430809cdd Update exit code value used for retry check - ArgumentException 2020-02-12 16:42:21 -08:00
Brian Cain
625bbf9cc8
Add more specific rescue exceptions for when errors occur for resizing
disks
2020-02-12 16:26:18 -08:00
Brian Cain
dafb60ad4f
Update experimental feature flag for disk 2020-02-12 15:38:34 -08:00
Brian Cain
c179b2fb22
Include updated unit tests for disk ext update 2020-02-12 13:51:59 -08:00
Brian Cain
efde9595c4
Add error case handling for resizing vmdk disks 2020-02-12 09:32:38 -08:00
Brian Cain
1826d210a0
Recover from cloning and resizin disk failures
This commit adds some recovery if Vagrant fails to reattach or clone a
vmdk disk that needs to be resized. It first moves the original disk
(after cloning) to a backup file. If something fails, it will reattach
the original disk to the guest and continue to raise the exception.
2020-02-11 16:02:24 -08:00
Brian Cain
3662344d2e
Update rspec tests for driver methods 2020-02-10 15:31:10 -08:00
Brian Cain
b11aa53294
Remove unused experimental flag for disk enablement 2020-02-10 13:03:58 -08:00
Brian Cain
b594715ded
Add tests for resizing disks 2020-02-10 12:58:11 -08:00
Brian Cain
0ea26b9506
Add test for comparing disk size 2020-02-10 12:58:11 -08:00
Brian Cain
d1d27a3b56
Add tests for handle_configure_disk 2020-02-10 12:58:11 -08:00
Brian Cain
6872625609
Add more tests for configure_disks virtualbox cap 2020-02-10 12:58:11 -08:00
Brian Cain
337f7dd616
Add cleanup_disks tests 2020-02-10 12:58:11 -08:00
Brian Cain
9150d3db7b
Always cleanup disks even if no disks in Vagrantfile 2020-02-10 12:58:11 -08:00
Brian Cain
eff3d47f82
Add cleanup_disks test 2020-02-10 12:58:11 -08:00
Brian Cain
9ca535dbfa
Add test for writing disk_meta file 2020-02-10 12:58:11 -08:00
Brian Cain
718332b35e
Fixup disk tests 2020-02-10 12:58:11 -08:00
Brian Cain
55cb8d1f0a
Add configure_disk blank unit test file and some method docs 2020-02-10 12:58:11 -08:00
Brian Cain
00b47a285e
Ensure decimal points are respected for numeric conversions 2020-02-10 12:58:11 -08:00
Brian Cain
65864f86da
Boost guest memory
With 2GB of ram, certain tests were timing out and not able to complete.
This commit bumps up that base setting to 5GB to be safe.
2020-02-07 16:15:28 -08:00
Brian Cain
0f1f559c5d
Update vagrant-spec readme 2020-02-07 15:36:15 -08:00
Brian Cain
8dc45976d6
Document VAGRANT_SPEC_ARGS option for running tests 2020-02-07 13:29:36 -08:00
Brian Cain
ef2075c9b2
Ensure nfs kernel server is on ubuntu hosts 2020-02-06 14:46:11 -08:00
Brian Cain
9aaea362c6
Introduce platform mapping for other kinds of vagrant boxes 2020-02-05 16:55:13 -08:00
Brian Cain
4cfaa9809b
Update readme with more info on how to run spec tests 2020-02-05 16:54:59 -08:00
Chris Roberts
21c1bb5e05 Add support for caching solutions. Remove GEMRC modifications.
This pull request adds an enhancement to the internal Bundler class
to cache solution sets. This prevents Vagrant from generating a
solution for configured plugins on every run. Modifications to
the configured plugin list (global or local) will result in the
cached solution being invalidatd and resolved again.

Also included is the removal of the GEMRC modifications required
for Windows.
2020-02-03 07:43:17 -08:00
Dmitri Vereshchagin
8befc12830 Fix use of -q option in curl invocation
curl ignores -q if it's not the first option.  Thus, prior to this
change, curl configuration file is used while performing HEAD request.
2020-02-03 00:00:36 +03:00
Brian Cain
ee8b38d47a
Set provisioner names to symbol
Because Vagrant is handling provisioner names to be symbols more
uniformly now, update the mocked tests to reflect this change. Otherwise
these provisioners will be ignored and not run.
2020-01-06 13:25:31 -08:00
Brian Cain
b4c302a74c
Set shell provisioner name in provision_test 2020-01-06 12:48:33 -08:00
Brian Cain
711270b90a
Fixes #11287: Set top level provisioner name if set in provisioner
config

Prior to this commit, if a user had configured a provisioner that had a
config with a `name` option, it would not properly set the top level
provisioner classes name config option which would lead to some
understanibly confusing results when trying to `--provision-with`. This
commit fixes that by checking to see if the top level name isn't set,
look to see if that provisioners config defines a name, and use that
instead.
2020-01-06 11:10:28 -08:00
Jeff Bonhag
7fb7dd8608
Enable WinSSH shell for vagrant ssh -c (#11258)
This commit changes the behavior of the builtin SSHRun action to use a Windows
shell if the WinSSH communicator is active.  This allows for running one-off SSH
commands with Windows Command Prompt or PowerShell.  By default, this will not
allocate a TTY for any SSH commands.

Example usage:

```
vagrant ssh -c 'dir "c:\program files"'
```

Updates docs to reflect a change made in
a55a53e6a46438d5093487f83248f01ddece4534.
2019-12-20 13:10:11 -05:00
Jeff Bonhag
ade076cabb
Fixes #11236: Windows port detection (#11244)
This reverts commit 81553263ab812a7fd0a2ab0f627bee139ad6397c.

This fixes a regression with Windows port detection which led to port
collisions not being fixed on `vagrant up`.

PR #8517 changed `IsPortOpen#is_port_open?` to rescue
Errno::EADDRNOTAVAIL, but when we merged it into master, there was code
in `HandleForwardedPortCollisions#port_check` that depended on that
error bubbling up.
2019-12-19 14:46:13 -05:00
Chris Roberts
25659a6f6b Support properly setting up synced folders on Catalina
Since the root file system is marked as read-only, attempting to
link the shared directory to `/vagrant` will fail. If the guest
path is on the root file system and APFS is used, create the
link as a firmlink instead.
2019-12-18 13:11:30 -08:00
Chris Roberts
80c05460ab Call hooks before and after each action if they are available 2019-12-18 13:11:30 -08:00
Brian Cain
4e58dfed2b
Merge pull request #11265 from briancain/LOCAL-ANSIBLE-BUG-PLUS-RSPEC
Fixup: ansible_local: Add `cap` bug fixes and related RSpec coverage
2019-12-18 08:20:59 -08:00
Brian Cain
61ee42976b
Merge pull request #11262 from briancain/return-if-no-disk-config
Return if no disk config
2019-12-17 13:55:08 -08:00
Brian Cain
7d667c9dea
Update ansible install tests 2019-12-17 13:34:52 -08:00