3822 Commits

Author SHA1 Message Date
Brian Cain
19d724dcd4
Remove unused require for MapCommandOptions class 2020-05-20 10:46:09 -07:00
Chris Roberts
5195bee9ea Check if plugin install provides specification
During a plugin install, if the plugin is already installed and
activated, no specification will be returned as there was nothing
new installed. In this situation, look for the requested plugin
within the activated specifications. If it is found, then proceed
since the plugin is installed. If it is not found, return an error.
2020-05-06 15:51:37 -07:00
Chris Roberts
f5b75ed0d6 Update IO util to properly handle unknown conversion errors
When converting encoding to UTF-8 on Windows, allow for unknown
conversions to be properly handled and prevent generating an
error.
2020-05-04 13:25:53 -07:00
Chris Roberts
307d7f70b6 Allow prerelease matches when Vagrant is a prerelease version
Sets prerelease on the request set based on Vagrant's version. This
allows installing plugins which may include a vagrant version constraint
when running on a development version without needing to a manual local
installation of the gem.
2020-05-01 16:05:49 -07:00
sophia
646de433a9 Validate conversion of map to cmd options 2020-04-29 15:10:48 -04:00
sophia
7e125969dd Add option box_download_options
Allow users to specify a map of extra options to pass to the downloader.
These options will be passed to curl, with a `--` appended to the key
2020-04-29 15:10:44 -04:00
Chris Roberts
4546d804b1 Add support for configuring SSH connect timeout
Retains the original default value of 15 seconds for SSH connect
timeout. Allows users to modify this timeout via SSH communicator
option. Enforces integer values for timeout and validates custom
values are greater than 0.
2020-04-20 14:23:21 -07:00
Sophia Castellarin
5dc96f0886
Merge pull request #11498 from soapy1/ubuntu-w-networkmanager
Choose netplan renderer based on network config and available tools
2020-04-17 09:50:31 -04:00
sophia
538ee948ee Choose netplan renderer based on network config and available tools 2020-04-10 17:17:04 -04:00
Chris Roberts
c5e2f36ddc
Merge pull request #11455 from chrisroberts/enhancement/triggers-insertions
Adjust how trigger actions are inserted into the stack
2020-04-08 16:53:17 -07:00
Sophia Castellarin
a3e8e822e4
Merge pull request #11465 from soapy1/quiet-cli-opt
Quiet cli option
2020-04-06 10:22:29 -04:00
Chris Roberts
5d70cc3bf2 Retain original trigger behavior
These updates allow the after trigger to behave the same as the
original with regards to the execution location of the trigger
within the execution stack.
2020-04-03 15:47:00 -07:00
sophia
39d7cd8997 Wrap all progress type outputs with rewriting to enable --no-tty 2020-04-03 16:28:59 -04:00
Jeff Bonhag
1e7399afa5
Merge pull request #11454 from jbonhag/fix/port-collision-net-test
Fix #11373: Check all interfaces for port collisions on Windows
2020-04-03 13:46:45 -04:00
sophia
e6c387cdce Refactor non interactive UI 2020-03-30 11:26:18 -04:00
sophia
0296e59baf Use :ui_class opt to set ui class 2020-03-30 10:21:14 -04:00
sophia
d230272062 Add NonInteractive UI 2020-03-30 09:32:23 -04:00
sophia
baaaf8e7e6 Output report progress if show progress is enabled 2020-03-30 09:32:23 -04:00
sophia
d6d6e2c362 Surface cli option to quiet progress 2020-03-30 09:32:23 -04:00
sophia
c5a5b3d0b2 Yield output based on ui opts 2020-03-30 09:32:22 -04:00
Chris Roberts
b8702ac889 Include default options in option parser
Adds method to shared helpers for adding procs to be evaluated
which can add default modifications to the option parser used
by commands. Customized option parser class within Vagrant
handles processing defined procs to set options.
2020-03-27 16:57:59 -07:00
Jeff Bonhag
dfad00fd25
Include machine name in error message
This will make it easier for folks to debug networking settings.
2020-03-27 11:49:21 -04:00
Chris Roberts
217f2530db Use machine specific triggers instance when machine is available in runner 2020-03-26 17:20:55 -07:00
Chris Roberts
bcbbc825e0 Add test coverage on builder 2020-03-24 17:15:41 -07:00
Chris Roberts
2e0e772897 Add test coverage on trigger action 2020-03-24 14:32:34 -07:00
Chris Roberts
4b65368852 Update builder to use generic trigger action 2020-03-23 17:10:17 -07:00
Chris Roberts
505715500d Include autoloading for trigger constant 2020-03-23 17:09:46 -07:00
Chris Roberts
5f6ac0a6e4 Update trigger action files 2020-03-23 17:08:44 -07:00
Chris Roberts
8fad4865bb Update before trigger action to be generic trigger action 2020-03-23 17:08:21 -07:00
Jeff Bonhag
00b72aa2c5
bug: test host platform, not guest platform 2020-03-20 09:56:43 -04:00
Jeff Bonhag
9c5291794a
Include interface names in debug log 2020-03-19 18:05:17 -04:00
Jeff Bonhag
6d228becf9
Raise an error if host IP is not found 2020-03-19 17:16:21 -04:00
Jeff Bonhag
705baaad46
Only do special 0.0.0.0 check on Windows hosts
If host_ip is nil or 0.0.0.0, only do the special port check on Windows
hosts, because non-Windows hosts can test 0.0.0.0 directly.
2020-03-18 17:39:33 -04:00
Chris Roberts
d08c68ecf3 Adjust how trigger actions are inserted into the stack
This adjusts how triggers are implemented during a normal run. Any
defined triggers which are applicable are located and injected into
the run stack as the stack is built, including hook type triggers.

Support is included for dynamic hook lookup.

The data type used when defining triggers has also been relaxed to
support symbols, strings, or constants.
2020-03-17 15:07:36 -07:00
Jeff Bonhag
b8ecab1201
Guard against nil Addrinfo objects
On Windows, `Socket.getifaddrs` may return nil if the address is not available in ifaddr.
2020-03-13 17:34:09 -04:00
Jeff Bonhag
d4acdd06ec
Fix #11373: Check all interfaces for port collisions
This commit changes the behavior of the port check to check all possible
IPv4 network interfaces when the host IP is `nil` or `0.0.0.0`. This
means that if the desired port is available on any network interfaces, a
forward from 0.0.0.0 will use that interface.

If the port is open (in use) on all interfaces, then it's treated as a
collision and will either throw an error or auto-correct the port, based
on the Vagrantfile configuration.
2020-03-13 16:30:01 -04:00
Jeff Bonhag
6efdcd2068
Merge pull request #11430 from chrisroberts/winssh-hacks
Fix issues with Windows SSH provisioner (continued...)
2020-03-11 10:39:44 -04:00
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
d96f7c4293 Fix documentation disable in generation hooks 2020-03-09 16:52:39 -07:00
Chris Roberts
351e053aeb Start adding test coverage to bundler class 2020-03-09 16:52:39 -07:00
Jeff Bonhag
df7c11a3a7 Fix issues with Windows SSH provisioner
Windows commands that run over SSH are wrapped in a script that writes a
special marker to the two output streams (stdout and stderr).  This
allows Vagrant to consume the output streams.

Unfortunately, this leads to a sort of chicken-and-egg problem where no
commands can be run before a wrapper script exists. For example, you
can't make a destination directory to upload the wrapper script without
first creating a wrapper script to make the directory. :)

This commit changes the behavior of the WinSSH communicator to assume
that the destination directory already exists for provisioning scripts.

It also moves the default `upload_path` from the shell provisioner
config so we can have OS-specific defaults.

Finally, it introduces a Windows-specific #upload method which will
properly use a Windows path separator on a non-Windows host.
2020-03-04 15:08:03 -08:00
Chris Roberts
98f0ec6ab7 Dynamically apply hooks to actions prior to execution
Removes dynamic calls of before/after hooks and replaces it with
proper lookups for hooks defined for the action to run. If hooks
are found for an action, the action is placed in a new builder
and the hooks are applied. The new stack is extracted, finalized,
and then executed.
2020-03-03 16:23:31 -08:00
Chris Roberts
2ac12cfde8 Add new hook lookup method and key generation helper 2020-03-03 16:13:41 -08:00
Chris Roberts
2186e92539 Add Hook class to the autoload list 2020-03-03 16:13:13 -08: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
Brian Cain
8af2e5c8be
Cast to float on conversation, and return helper size vars to integer 2020-02-10 13:01:41 -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