959 Commits

Author SHA1 Message Date
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
Sophia Castellarin
b41db6bebe Output cloud init messages to user
Co-authored-by: Jeff Bonhag <jbonhag@hashicorp.com>
2020-07-31 12:10:43 -05: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
4b15435262
Fix method docs 2020-06-29 11:00:16 -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
sophia
9b6c562016 Set run config for provisioner 2020-05-29 15:33:43 -04:00
sophia
1a3e6c8ed5 Allow provisioner to take list of provisioners to run 2020-05-29 15:33:42 -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
c18ceb20bc
Define custom port_check method for halted docker containers 2020-05-12 11:17:15 -07: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
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
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
Chris Roberts
4b65368852 Update builder to use generic trigger action 2020-03-23 17:10:17 -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