248 Commits

Author SHA1 Message Date
Chris Roberts
886aab2ff9 Load rubygem patches 2024-01-12 15:27:31 -08:00
Chris Roberts
2d5c9c0d12 Patch net-ssh for ecdsa private keys
This patches net-ssh so it will properly handle loading and using ecdsa
private keys. Patching is restricted to tested versions.
2024-01-10 11:52:46 -08:00
Chris Roberts
288f8ba552 Update path check for ssl helper
A path check is done prior to loading the vagrant ssl helper, but it was
only checking for a file with a `.so` suffix so `.bundle` files on macos
would be ignored and the helper not loaded.

Include both paths when checking for the library existence.
2023-10-18 17:44:18 -07:00
Chris Roberts
7824c2dad2 Note when ssl helper was not found 2023-09-14 16:15:02 -07:00
Chris Roberts
e958c6183a Adds initial HCP config support
Adds initial basic support for HCP based configuration in vagrant-go.
The initalization process has been updated to remove Vagrantfile parsing
from the client, moving it to the runner using init jobs for the basis
and the project (if there is one). Detection is done on the file based
on extension for Ruby based parsing or HCP based parsing.

Current HCP parsing is extremely simple and currently just a base to
build off. Config components will be able to implement an `Init`
function to handle receiving configuration data from a non-native source
file. This will be extended to include a default approach for injecting
defined data in the future.

Some cleanup was done in the state around validations. Some logging
adjustments were applied on the Ruby side for better behavior
consistency.

VirtualBox provider now caches locale detection to prevent multiple
checks every time the driver is initialized.
2023-09-07 17:26:10 -07:00
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
Chris Roberts
415b006ebd Add helper for loading OpenSSL providers
On OpenSSL 3, engines have been deprecated being replaced by providers.
The Ruby openssl library supported loading specific engines, but there
is no replacement currently using providers. The winrm communicator
specifically relies on a MD4 which OpenSSL has marked as legacy and no
longer loads by default.

The extension included loads the legacy provider as well as the default
provider. The legacy provider includes MD4, thus allowing winrm to
function again.
2023-05-25 15:36:55 -07:00
Chris Roberts
672a408dbc Isolate protobuf message loading to server mode
Prevent protobuf loading when not in server mode. This allows proper
loading on platforms which don't have support for the protobuf
libraries.
2022-12-16 16:21:06 -08:00
Chris Roberts
e2165917e5 Always load protos regardless of server mode 2022-12-08 11:42:51 -08:00
Chris Roberts
40a90fd9b4 Remove net-ssh patches 2022-11-08 13:59:32 -08:00
Chris Roberts
d31f9a59a5 Only patch fake_ftp when running tests
The fake_ftp patches should only be applied when running tests. Since
the library is a development dependency only, it will not be available
for loading from a release.
2022-08-02 10:44:07 -07:00
sophia
df94a36568 Patch fake_ftp for determining the size of files 2022-08-01 11:30:29 -05:00
Chris Roberts
4bcef5de84
Update initial logger configuration to properly apply 2022-04-25 12:26:19 -05:00
Chris Roberts
1b8686d471
Use configurator for level configuration 2022-04-25 12:26:19 -05:00
Chris Roberts
fb1dc2cc59
Load log4r patches at startup 2022-04-25 12:26:19 -05:00
sophia
78fbd12da9
Use remote plugin manager when in server mode 2022-04-25 12:26:13 -05:00
sophia
d5007d4d85
Use remote plugin module when in server mode 2022-04-25 12:26:13 -05:00
Chris Roberts
819a4d28a4
Reconfigure legacy vagrant to utilize hclog 2022-04-25 12:24:46 -05:00
sophia
bb6174d305
Log output to file 2022-04-25 12:23:57 -05:00
sophia
854a2a4022
Just get the flag names 2022-04-25 12:23:55 -05:00
Chris Roberts
02b08ac12c
Remove option parser modifications for storing flags 2022-04-25 12:23:54 -05:00
sophia
1109d89616
Collect flag information 2022-04-25 12:23:54 -05:00
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07:00
Chris Roberts
80ec78929a Adjust syntax on method 2021-03-09 08:05:55 -08:00
Chris Roberts
034cb8c59e Update net-ssh constraint to non-prerelease version
To prevent resolution issues with the introduction
    of a prerelease constraint, update the net-ssh constraint
    to be a minimum at the latest release. Include monkey
    patches to include support for wanted host key algos.
    The monkey patches are only applied to the latest
    net-ssh currently and will be ignored once the current
    prerelease has been fully released.
2021-02-25 17:07:00 -08:00
Chris Roberts
3ec8d44cf9 Remove debug setup for restclient logger 2020-11-03 13:31:41 -08: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
Brian Cain
f1bae9f1eb
Remove level conditional for RestClient logging 2018-10-12 09:07:12 -07:00
Brian Cain
adefbbaf6e
Scrub Vagrant Cloud tokens from RestClient logger 2018-10-12 09:07:12 -07:00
Brian Cain
e70b871660
Introduce cloud command
This commit adds a new command to Vagrant called `cloud`. It handles any
and all interactions with the external service Vagrant Cloud.
2018-10-12 09:06:00 -07:00
Chris Roberts
8500a609f5 Remove sensitive values from logger output 2018-09-10 10:40:51 -07:00
Robert Schulze
28771674d6 add Vagrant.version? helper method
to check Vagrant for a version match without raising an error.
2018-09-07 11:37:30 +02:00
Chris Roberts
3ace82cc5b Update Vagrant.has_plugin? helper to function prior to plugin loading
Due to the Vagrantfile being loaded prior to plugin loading to determine
project local plugin information the Vagrant.has_plugin? helper will always
return false when the Vagrantfile is first loaded. To prevent this behavior
we can check for plugins in the plugin data files prior to the plugins
being loaded, and after they have been loaded we can fallback to the
original specification based check.
2018-08-31 14:03:42 -07:00
Chris Roberts
40f4e6f67e Vagrant Environment isolated plugins
Adds support for plugins isolated to a specific `Vagrant::Environment`
which can be managed by the vagrant plugin command using the the
--local flag.
2018-07-17 14:49:41 -07:00
Chris Roberts
87b8321702 Remove win32 dependencies 2018-06-12 13:54:37 -07:00
Chris Roberts
d58096da31 Update plugin loading to prevent error suppression
Only catch exception types we care about when attempting to load
plugins. If no require call is successful, force an exception
instead of ignoring.
2018-05-08 13:47:31 -07:00
Chris Roberts
6ae1f4a2f6 Fix require for ffi-win32-extensions
Fixes #9698
2018-04-18 12:42:46 -07:00
Chris Roberts
9731720773 Update generated ssh private key file permissions on create
This updates the permissions on the automatically generated private
key file to only be readable by the user. Includes support for file
permission modification on Windows platform.
2018-04-10 14:15:14 -07:00
Chris Roberts
f3c5e86f28
Merge pull request #9504 from zachflower/feature/vagrant-aliases
Vagrant aliases
2018-04-06 15:39:18 -07:00
Chris Roberts
8ac0fedbbb Suppress errors from invalid path encoding and carry on with best effort
Fixes #9299
2018-04-04 16:09:46 -07:00
Zachary Flower
bbb3cdaa9a vagrant aliases proof-of-concept 2018-02-10 17:58:18 -07:00
Chris Roberts
522d503030 Use Ruby's resolver by default and allow replace to be disabled 2018-01-22 10:40:33 -08:00
Chris Roberts
6f663edad0 Scrub sensitive information prior to message output
This provides a simple wrapper around all output to
scrub any strings that have been registered as sensitive
before being output. Also included is a small change
to the initial debug output to only show vagrant specific
environment variables and not the full user environment.
2017-12-14 15:38:31 -08:00
Chris Roberts
da42bfa8ac Provide optional timestamp on log output
Enable log message output to be prefixed with the date and time.
Include CLI flag to optionally enable `--timestamp` and a
convenience flag to enable debug logging with timestamps at
the same time `--debug-timestamp`.
2017-12-13 17:05:51 -08:00
Chris Roberts
564ed7456d Warn when failing to require plugin instead of hard failure 2017-03-22 16:40:42 -07:00
Chris Roberts
25a2bdd279 Prevent generating environment variables with invalid empty names 2017-01-12 15:12:41 -08:00
Chris Roberts
9717432920 Add logger output when plugin loading is disabled 2016-11-28 16:55:38 -08:00
Chris Roberts
d87cf25ed2 Display original exception and backtraces in logger output 2016-11-28 07:48:16 -08:00
Chris Roberts
33c9d6183a Provide more log information about configured plugins 2016-11-16 13:17:38 -08:00
Chris Roberts
e2d96f942f Provide nice error output when plugin initialization fails
Include extra logging during initialization to display error if encountered
and solution set prior to performing activations.
2016-11-15 15:50:39 -08:00