184 Commits

Author SHA1 Message Date
Chris Roberts
031890fcc7
Allow plugin manager to be swapped out for remote manager 2022-04-25 12:26:15 -05:00
sophia
1db38e65f8
Setup remote plugin manager when in server mode 2022-04-25 12:26:14 -05:00
sophia
94a203efc9
Inject dummy client into remote synced folders 2022-04-25 12:26:14 -05:00
sophia
78fbd12da9
Use remote plugin manager when in server mode 2022-04-25 12:26:13 -05:00
sophia
ab395ad730
Move remote communicator to remote plugin module 2022-04-25 12:26:09 -05:00
sophia
10b4015455
Setup remote communincator 2022-04-25 12:26:07 -05:00
sophia
e71e887331
Move remote synced folder module into remote plugin module 2022-04-25 12:26:06 -05:00
sophia
847d87a017
Get synced folder from machine 2022-04-25 12:26:04 -05:00
sophia
b58b77ef0b
Add capability methods for remote server 2022-04-25 12:26:03 -05:00
sophia
8bce3e6bd7
Enable remote mode for synced folders 2022-04-25 12:26:03 -05:00
sophia
4251b2ff7c
Get first level parent from ruby plugins 2022-04-25 12:24:48 -05:00
sophia
09a836745a
Don't search for parent plugins that don't exist in the Ruby run time 2022-04-25 12:24:48 -05:00
sophia
7477455380
Get parents from guest plugin 2022-04-25 12:24:39 -05:00
Chris Roberts
df53588de5
Store machine client within index entry for use in generating environment 2022-04-25 12:24:34 -05:00
Chris Roberts
99aef42342
Check for server mode before setting constant 2022-04-25 12:24:34 -05:00
Chris Roberts
927fd5e52f
Remove proto requires
They will only be needed when running in server mode, and when
in server mode, they will be loaded at startup
2022-04-25 12:24:34 -05:00
sophia
f722b15661
Remove references to SDK from remote machine index 2022-04-25 12:24:28 -05:00
sophia
8808ef353e
Clean up logging 2022-04-25 12:24:27 -05:00
sophia
90968ea430
pPss environment client to machine index eentry environment 2022-04-25 12:24:27 -05:00
sophia
3bda8b24ef
Save point: Get a target successfully from target index 2022-04-25 12:24:26 -05:00
sophia
a128d98dea
Move to_proto to config classes 2022-04-25 12:24:21 -05:00
sophia
0e40c2eb97
to_proto save point 2022-04-25 12:24:20 -05:00
Chris Roberts
8771e6078f
Add parents method to host plugin 2022-04-25 12:24:12 -05:00
Chris Roberts
c09fc7be1e
Whitespace cleanup 2022-04-25 12:23:55 -05:00
Chris Roberts
3d0d0148e9 Update tests to use real UI instance
Replaces use of UI doubles within tests to use actual UI instance
    to ensure calls are passing parameters correctly.
2021-06-23 14:04:48 -07:00
sophia
5607428a66 Don't try to recover machine without a uuid 2020-09-15 11:16:13 -05:00
sophia
943047d003 Add tests for synced folder collections 2020-08-19 17:57:57 -05:00
Chris Roberts
cd2d84fda7 Adjust synced folder collection class 2020-08-19 15:00:40 -05:00
sophia
faad9f2717 Add tests 2020-08-19 15:00:40 -05:00
sophia
afd2a28f60 Add synced_folder_capability 2020-08-19 15:00:40 -05:00
sophia
1661d1f1cf Print help message if user provides and ambiguous option 2020-07-06 10:52:05 -05:00
Sophia Castellarin
955f1f1b25
Merge pull request #11656 from soapy1/recover-from-missing-global-data
Add local machine to global index of machines if it does not exist
2020-06-17 15:18:48 -05: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
Chris Roberts
916655dbd3 Fix trigger matching on :all special value
Updates the type to do a proper comparison when checking for
the `:all` special value as well as applied ignores.

Fixes #11599
2020-06-09 16:12:48 -07:00
sophia
132720e3b4 Add local machine to global index of machines if it does not exist 2020-06-09 17:22:55 -05: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
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
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
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
Chris Roberts
2ac12cfde8 Add new hook lookup method and key generation helper 2020-03-03 16:13:41 -08:00
Chris Roberts
88c675694a Update trigger abort behavior when running parallel actions
When the provider supports parallel actions and actions are being
run in parallel, do not immediately kill the process on failure.
Instead terminate the action thread and log the exit code. Once
all running actions have completed, the process will then exit
with the stored exit code.
2019-06-04 16:40:59 -07:00
Brian Cain
eb3e309f89
Ensure guest names are string when filtering
Prior to this commit, if a guest name was given as a symbol, the
filter_triggers method would fail to properly match it with the only_on
option, as it is not a valid type to the #String.match method. This
commit fixes that by converting the parameter to a string so that it can
be properly matched on the guest.
2019-05-13 14:07:22 -07:00
Brian Cain
35ee3e2342
Fixes #10823: Use Process.exit! for abort trigger option
Prior to this commit, the `abort` option for triggers would just call
`exit`, which would end up raising a SystemExit exception, signaling
Vagrant to abort. This broke down however in a multithreaded context
like when running multiple guests at once on supported providers,
resulting in Vagrant failing to exit cleanly and instead raise an
exception. This commit changes that by instead using `Process.exit!` to
abort Vagrant.
2019-05-03 14:48:54 -07:00
Brian Cain
08214ec90f
Ensure action param is a symbol, and if nil return to do nothing 2019-02-01 13:34:15 -08:00
Brian Cain
16b5ad74ca
Handle command triggers with run_remote options
This commit adds some handling around when a machine does not exist at
all but a trigger was defined with a run_remote option
2019-02-01 13:34:15 -08:00
Brian Cain
ec9bda78c3
Remove comment 2019-02-01 13:34:15 -08:00
Brian Cain
fefb702359
Introduce type and command triggers
This commit introduces some basic functionality for typed triggers:

- command
- action

Command triggers are triggers that will run before or after a given
sub-command.

Action triggers are for running triggers before or after internal
actions for Vagrant. This could be before or after a provision step,
before or after synced folders, or networking, etc.
2019-02-01 13:34:15 -08:00
Brian Cain
608863809a
Merge pull request #10405 from briancain/fixup-inline-windows-trigger-run
Fixes #10393: Only use Shellwords on non-windows hosts
2018-11-13 14:25:27 -08:00
Brian Cain
69b3b44505
Fixes #10393: Only use Shellwords on non-windows hosts
This commit updates how the trigger `run` inline option works by only
applying `Shellwords.split` to the inline command if it is going to be
run on non-Windows hosts. Otherwise pass the inline script directly to
be executed by Powershell.
2018-11-13 13:07:39 -08:00