102 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Paul Hinze
2707d09181
Fix prepend/append action hooks firing multiple times
This addresses the surprising behavior that the StoreBoxMetadata hook
was running many times during a machine up, including during failed
operations where a destroy_on_error deleted the machine. This was
resulting in an error that looked like:

> No such file or directory @ rb_sysopen [...] /[...]/box_meta

Plugin action hooks using prepend/append were attaching every time a
Builder was run, including sub-Builders that show up for things like
Call actions.

To fix this, we tell Builders if they are "primary" and only run
prepend/append on those. See inline comments for more explanation.
2022-04-25 12:26:55 -05:00
Paul Hinze
a4f426d26e
Modify SSH utils server mode behavior so ssh -c works
Still work left to do on exec and stderr separation but this represents
enough working to let vagrant-spec assertions pass so I think it's worth a
checkpoint!
2022-04-25 12:26:48 -05:00
sophia
90033b9b68
Only prepend remote mixin synced folders when running in remote mode 2022-04-25 12:26:13 -05:00
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07: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 Castellarin
3d4b721a22
Merge pull request #11579 from soapy1/provisioner-communicator_required
Provisioner communicator required
2020-07-17 10:45:34 -05:00
sophia
3f867e0df4 Add cloud init wait action 2020-07-16 15:40:39 -05: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
sophia
66a3b58c08 Add provider capaiblity :has_communicator 2020-06-09 09:33:11 -05: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
Chris Roberts
505715500d Include autoloading for trigger constant 2020-03-23 17:09:46 -07:00
Chris Roberts
2186e92539 Add Hook class to the autoload list 2020-03-03 16:13:13 -08:00
Brian Cain
e4a57a8e1d
Add virtualbox cleanup_disks action 2020-02-10 12:58:11 -08:00
Brian Cain
cef1bd47b3
Add initial disk builtin action 2019-11-22 14:40:23 -08:00
Chris Roberts
a9223cf443 Add missing action autoloads
Fixes #9303
2018-04-04 16:27:06 -07:00
Mitchell Hashimoto
36cfc77167 providers/virtualbox: make prepare clone a core thing 2015-10-08 16:02:37 -04:00
Mitchell Hashimoto
ed4df21c85 commands/snapshot: push and pop 2015-10-07 22:52:27 -04:00
Mitchell Hashimoto
e93038fd0e providers/hyperv: suspend/resume 2014-02-27 08:13:11 -08:00
Mitchell Hashimoto
e537e02d9d core: BoxCheckOutdated can check if a box is outdated 2014-02-05 21:20:11 -08:00
Mitchell Hashimoto
b2fa785d07 core: Environment loads proper version of box 2014-02-05 21:19:51 -08:00
Emiliano Ticci
578393ac8e Add cleanup routine to synced folder plugin implementation 2013-12-02 11:19:09 +01:00
Mitchell Hashimoto
3bedc77cc4 Merge branch '2293-track-box-url' of https://github.com/fgrehm/vagrant into fgrehm-2293-track-box-url
Conflicts:
	plugins/commands/box/command/list.rb
2013-11-25 13:20:26 -08:00
Mitchell Hashimoto
3701b955cb core: allow hooking around provisioner runs
/cc @fgrehm - :) I think you'll understand.
2013-11-24 21:15:22 -08:00
Mitchell Hashimoto
d6fb083507 Merge pull request #2405 from fgrehm/2044-provisioner-hooking
core: support hooking around provisioners runs
2013-11-24 21:07:53 -08:00
Mitchell Hashimoto
079ac12f5d core: remove NFS action 2013-11-22 16:53:17 -08:00
Mitchell Hashimoto
93a4066339 core: SyncedFolders built-in middleware 2013-11-22 16:12:51 -08:00
Fabio Rehm
05a8cf523a core: Get rid of code that deals with box info on a separate statefile 2013-10-29 13:09:24 -02:00
Fabio Rehm
1c689d2211 core: Remove box information from state file after box removal 2013-10-29 13:09:23 -02:00
Fabio Rehm
e4b5db829e commands/box: Extract box removal code from box remove command into a builtin action 2013-10-29 13:09:23 -02:00
Fabio Rehm
670a441a99 core: Scaffold an action for persisting box information 2013-10-29 13:09:23 -02:00
Fabio Rehm
2debce9dd9 core: Improve provisioner hooking by introducing a new builtin action for wrapping provisioner runs 2013-10-29 13:08:52 -02:00
Mitchell Hashimoto
261d0ef6cd core: WaitForCommunicator - more robust wait for boot
This is a new built-in middleware that is more robust for
waiting for boots. The "max_tries" configuration is now gone, it is
timeout based. Future commits will make this even better as the
SSH communicator will implement the new "wait_for_ready" in a better
way.
2013-08-29 16:27:00 -07:00
Mitchell Hashimoto
d4c7e20110 core: ProvisionerCleanup task to run cleanup on provisioners 2013-08-29 11:13:43 -07:00
Mitchell Hashimoto
780a312fc9 Built-in DestroyConfirm middleware 2013-04-19 14:14:29 -06:00
Mitchell Hashimoto
c9ad55d9e7 Built-in hostname middleware for setting hostname 2013-02-27 21:28:09 -08:00
Mitchell Hashimoto
1505fc9d22 Autoload he port collision middleware 2013-02-27 13:37:50 -08:00
Mitchell Hashimoto
6afb4326fa Move NFS to a built-in middleware 2013-02-08 15:34:04 -08:00
Mitchell Hashimoto
cd3d2a1e8c Call properly modifies original environment 2013-02-06 18:36:05 -08:00
Mitchell Hashimoto
165dd63f78 New HandleBoxUrl built-in middleware to handlet the "box_url" config 2013-02-01 11:31:08 -08:00
Mitchell Hashimoto
9ae3a373c8 Add new middleware builtin: Lock
This will do a process lock by flocking a file. If it fails, it will
raise an exception of choice.
2013-01-28 17:08:37 -08:00
Mitchell Hashimoto
51540496a9 GracefulHalt builtin 2013-01-22 11:56:49 -08:00
Mitchell Hashimoto
7f55d5eac8 Builtin: ConfigValidate will validate your configuration 2013-01-18 13:26:14 -08:00
Mitchell Hashimoto
212e634c3b Make Provision a built-in action.
This allows other providers to just use it.
2013-01-12 16:22:37 -08:00
Mitchell Hashimoto
78d79de5c4 Comment the action_box_add method 2012-08-18 16:19:13 -07:00
Mitchell Hashimoto
47fe278667 vagrant box add works again. Box verification remove temporarily.
The built-in middleware sequences will now be hardcoded onto
Vagrant::Action. Other plugins can hook into these sequences to provide
verification and so on. So the VirtualBox plugin will hook into that
action sequence and add verification.
2012-08-18 16:13:14 -07:00
Mitchell Hashimoto
fa4cf63462 Remove the actions that are unavailable now from autoload 2012-08-15 21:55:47 -07:00
Mitchell Hashimoto
2fc18f7207 destroy gets a little farther, and properly halts the VM 2012-08-13 23:18:50 -07:00
Mitchell Hashimoto
5e70ad0ec2 vagrant ssh -c now uses a middleware sequence 2012-08-10 00:57:23 -07:00
Mitchell Hashimoto
e0ec679838 vagrant ssh with full console works with new provider.
This works by now calling the `:ssh` action on the provider. This action
is allowed to do whatever it pleases, but should at some point probably
call the `SSHExec` built-in middleware.

The `SSHExec` built-in middleware was added. This uses the information
returned by `Machine#ssh_info` and uses the `Vagrant::Util::SSH` helper
to exec into the remote machine. The provider should do any work upfront
in verifying that the machine is ready to be SSHed into.
2012-08-05 13:45:24 -07:00