248 Commits

Author SHA1 Message Date
sophia
f9b1d52ec6 Catch error for when guest is not available 2020-09-10 16:28:38 -05:00
Sophia Castellarin
3835da3839
Merge pull request #11797 from soapy1/synced-folder-caps
Synced folder caps for mount options and default fstab modification behaviour
2020-08-21 11:44:15 -05:00
sophia
bb5d0e9c28 Remove credentials scrubbing from caching synced folders
Passwords are (and should) never stored be as part of folder data.
I think there is also a case to be made about desensitizes
information here can lead to leaking of credentials. For example if
an exported folder is named "vagrant" and the users password is
"vagrant", the synced_folder cache will show "****" in place of the
folder name, indicating that it is also password.
2020-08-19 17:43:22 -05:00
Chris Roberts
cd2d84fda7 Adjust synced folder collection class 2020-08-19 15:00:40 -05:00
sophia
2a8372a272 Add mount type cap 2020-08-19 15:00:40 -05:00
sophia
bc898e385d Update tests for synced folder typed hash 2020-08-19 15:00:40 -05:00
Chris Roberts
e9ece2ab58
Merge pull request #11814 from chrisroberts/f-dep-warns
Updates to address all Ruby deprecations and warnings
2020-08-12 09:07:10 -07:00
Chris Roberts
5003bb6e15 Updates to address all Ruby deprecations and warnings
This includes updates for resolving all warnings provided by Ruby
for deprecations and/or removed methods. It also enables support
for Ruby 2.7 in the specification constraint as all 2.7 related
warnings are resolved with this changeset.
2020-08-10 13:05:41 -07:00
Chris Roberts
05a3e122fb Only warn when configured host IP is not found on local device 2020-08-07 16:38:15 -07:00
Sophia Castellarin
a2811909be
Merge pull request #11618 from jbonhag/fix/empty-box
Treat an empty box value as invalid
2020-08-07 11:18:33 -05:00
Sophia Castellarin
c17ba03904
Merge pull request #11773 from soapy1/cloud-init-wait-action
Add cloud init wait action
2020-08-06 16:28:45 -05:00
sophia
a1d429a4e8 Raise more descriptive error if cloud init fails 2020-08-06 15:47:36 -05:00
Jeff Bonhag
3a1705b50a
Make sure we don't run an empty box 2020-07-31 15:29:06 -04:00
Jeff Bonhag
db57af5bca
Write meta-data as yaml 2020-07-31 11:58:06 -04:00
Jeff Bonhag
c60d1f8565
Set MIME-Version for user data 2020-07-31 11:57:56 -04:00
sophia
0a5a940e58 Raise an error if cloud-init is not found on guest 2020-07-29 12:50:50 -05:00
Sophia Castellarin
3d4b721a22
Merge pull request #11579 from soapy1/provisioner-communicator_required
Provisioner communicator required
2020-07-17 10:45:34 -05:00
sophia
e5d7813b0a Call cap for building iso 2020-07-16 15:40:45 -05:00
sophia
3f867e0df4 Add cloud init wait action 2020-07-16 15:40:39 -05:00
Brian Cain
39c3ee7230
Update code style for map/each methods 2020-06-29 11:16:55 -07:00
Brian Cain
3caca048c8
Update setup to decouple disk attachment from user_data setup 2020-06-29 11:00:16 -07:00
Brian Cain
d6fc70dd68
Include volume_id in iso host cap params 2020-06-29 11:00:16 -07:00
Brian Cain
39a12de38f
Ensure meta-data is also included in cloud-init iso 2020-06-29 11:00:16 -07:00
Brian Cain
6797b96cae
Save file as user-data 2020-06-29 11:00:16 -07:00
Brian Cain
42718437ab
Initial commit of cloud_init setup action
This commit introduces a new builtin action for preparing and
configuring guests cloud_init configs as an iso to be attached later by
the disk actions
2020-06-29 11:00:16 -07:00
Jeff Bonhag
f9f2fc0dd5
Merge pull request #11654 from jbonhag/fix/loopback-forward
Fix #11640: Check port of loopback address
2020-06-16 14:54:16 -04:00
Chris Roberts
c9a65ac75b
Merge pull request #11688 from chrisroberts/f-trigger-all
Fix trigger matching on `:all` special value
2020-06-15 14:15:26 -07:00
Chris Roberts
f26440ee38 Only allow the all special value to be matched when requested
This prevents the all special value from being matched on the
non-defined raw action names when the typed triggers support
is enabled.
2020-06-12 17:09:31 -07:00
sophia
b02a78c661 Change config option to allow_hosts_modification 2020-06-12 14:50:07 -05:00
sophia
ff0aea4493 Add option to disable modification of /etc/hosts on guest 2020-06-12 14:25:19 -05:00
sophia
66a3b58c08 Add provider capaiblity :has_communicator 2020-06-09 09:33:11 -05:00
Jeff Bonhag
73130e3ff6
Switch to Vagrant::Util methods 2020-05-29 15:51:24 -04:00
Jeff Bonhag
e7d48b0b93
Remove test double
We don't actually need a test double here because `#ipv4_loopback?`
will return true for any address in the `127.0.0.0/8` space.
2020-05-29 15:30:38 -04:00
Jeff Bonhag
270462fc89
Fix #11640: Check port of loopback address
If the given host_ip is a loopback address, proceed with the regular
port check.
2020-05-29 15:30:21 -04:00
Brian Cain
5aff6660fb
Move port checker method to class rather than instance
This commit also moves out the ipv4_interfaces method to be a util
method, so that the port checker can also access it as a class mehtod
2020-05-12 10:54:23 -07:00
Brian Cain
b2d9abe344
Fixes #9067: Ensure new containers don't grab existing bound ports
Prior to this commit, if a created but exited container bound a port,
and a new container grabed that same port (say for an ssh port forward),
when the initial container came back up it would fail because the port
also got bound to the second container. This commit fixes that behavior
by first looking at what containers are already bound prior to creating
a container.
2020-05-11 10:17:22 -07: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
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
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
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
Chris Roberts
3686aed72d Add test coverage for dynamic action hook support 2020-03-03 16:23:31 -08:00