Commit graph

3687 commits

Author SHA1 Message Date
Chris Roberts
b375e4d5b6
Remove activation at startup, add helper
This removes the gem activation from the startup and adds a
helper for properly activating gems based on the defined
runtime constraints of the vagrant specification at loading
time.
2024-11-06 17:33:00 -08:00
Chris Roberts
b5d62e2d81
Merge pull request #13343 from tnaroska/docker_build_containerd_fix
Fix#13342 adapt docker provider build for containerd storage
2024-11-01 14:07:00 -07:00
Chris Roberts
551e1b8116
Include test for double digit ansible version 2024-10-30 12:52:56 -07:00
Chris Roberts
85d97f5383
Add support for VirtualBox 7.1 2024-10-30 12:06:29 -07:00
Allison Larson
f977161282
Merge pull request #13496 from allisonlarson/allison-virtualbox-state-update
Update provider/virtualbox to allow paused state when booting vm
2024-09-23 12:04:49 -07:00
Allison Larson
1347f706a4 Add WaitForCommunicator test 2024-09-10 15:57:10 -07:00
Allison Larson
380eccc3b9 bsd/nfs: Check the status of nfsd before update/restart 2024-08-21 13:55:48 -07:00
Allison Larson
2cb8183fe7
Merge pull request #13489 from allisonlarson/allison-docker-full-id
Match docker image id on full output from list when building
2024-08-16 10:17:17 -07:00
Allison Larson
1056f76922 Match docker image id on full output from list when building 2024-08-15 14:35:20 -07:00
Allison Larson
72579915d0 Pass docker exec_options to executor as kwargs 2024-08-14 13:52:12 -07:00
Chris Roberts
015e050195
Merge pull request #13346 from camillo-toselli/main
Update configure_disks.rb
2024-07-10 17:53:07 -07:00
Chris Roberts
f8ba723978
Adjust test to properly mock kwargs 2024-07-10 17:26:35 -07:00
Chris Roberts
12df089810
Properly match container ID when trailing content exists 2024-07-10 16:56:32 -07:00
Chris Roberts
df5d8f11f5
Merge pull request #13373 from tomjn/patch-2
Check if the docker config is nil, fixes #13371
2024-07-10 16:42:12 -07:00
Chris Roberts
558682ad5b
Merge pull request #13375 from patrickpoortman/fix_gather_ansible_version
provisioner/ansible: Fix ansible version gathering in host provisioner
2024-07-10 16:25:23 -07:00
Chris Roberts
441efe7483
Add test coverage for missing information 2024-07-10 16:07:29 -07:00
Chris Roberts
4fc1311f93 Fix cloud provider upload command
Fixes the cloud provider upload command to properly include the architecture
value when determining the correct provider.
2024-06-26 08:44:36 -07:00
Patrick Poortman
5436162851
Fix Python command in ansible provisioner tests 2024-04-02 15:18:20 +02:00
Timo Naroska
ce15776b32 Fix#13342 adapt docker provider build for containerd storage 2024-01-27 23:30:57 -08:00
Chris Roberts
c239e37b2f Force config value type and add test coverage
When extracting the config value from the data, force it to an Array
type for the size check. Include a test case that includes missing
configuration information to verify it does not produce an error.
2024-01-23 13:57:04 -08:00
Chris Roberts
5a7fd6b302 Inspect guest for supported key types
Updates the SSH communicator to inspect the guest sshd configuration for
supported key types when creating a new key to replace the default
insecure public key. If the guest cannot be inspected, the connection
will be inspected. If the connection cannot be inspected, it will simply
fall back to the original behavior of using an rsa type key.
2024-01-18 11:53:00 -08:00
Chris Roberts
96f2039bcd Use ssh key type defined by configuration
If key type is defined as :auto, detect best key type to use. If no
acceptable key type is detected as supported by the server, raise an
error. If unable to determine supported key types from the server,
fallback to original behavior of rsa type key.

If key type is defined as custom value, use that type if the server
supports it, or if the supported types cannot be read. Otherwise, raise
an error informing the user that the key type is not supported.
2024-01-10 11:52:46 -08:00
Chris Roberts
443ff01ab7 Add key_type configuration option for ssh
Adds a new `key_type` option to the Vagrantfile ssh configuration. It
defaults to :auto which allows auto detection of key type to use.
Otherwise it can be set to an explicit type supported by Vagrant.
2024-01-10 11:37:50 -08:00
Chris Roberts
3eb85f9286 Add failing test for box collection sorting 2024-01-03 16:29:30 -08:00
Chris Roberts
3367154f5d Update CPU mapping values
Specifically for Windows hosts, the target CPU string will report as
`x64`, not `x86_64`. Include the value in the mapping to get the
properly value.
2023-10-19 10:48:18 -07:00
Chris Roberts
74b4a2b1f5 Adjust installation for unknown default architecture
When the reported architecture is unknown and the provider is listed as
the default architecture, add the box without architecture information
so it is installed without architecture information on the path within
the collection.
2023-09-26 16:20:37 -07:00
Chris Roberts
c8a7989b88 Adjust internal layout to allow downgrading
With the initial layout of `provider/architecture`, after installing a
box with architecture support downgrading Vagrant would result in it
being unable to process the box collection. Swapping the layout to be
`architecture/provider` allows downgrades to still properly process the
box collection.
2023-09-25 15:09:29 -07:00
Chris Roberts
9ef5c49598 Use api endpoint for expanded urls
When expanding the box url, prefer the API endpoint which is updated to
include provider architecture information. Test the API endpoint and the
legacy endpoint and use which ever is valid, with the API taking
precedence. This allows Vagrant to continue with non Vagrant Cloud
servers that do not implement the API endpoint.
2023-09-15 17:30:32 -07:00
Chris Roberts
6e13612111 Add test coverage for architecture support 2023-09-14 16:15:03 -07:00
Chris Roberts
5513173758 Remove duplicate test constant 2023-09-14 16:15:02 -07:00
Chris Roberts
2170136c37 Update test output to only show progress 2023-09-14 16:15:02 -07:00
Chris Roberts
6db640fb14 Adjust vbox hostonly config for ipv6
Check the type when an ipv6 address is being used. If the type does not
have a `6` suffix, append it.
2023-09-11 17:48:02 -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
602d42bbc8 Add and update tests for insecure private keys
Updates existing test coverage to use insecure private key collection
and adds testing for behavior changes within the communicator and the
keypair utility.
2023-06-26 15:47:32 -07:00
Chris Roberts
d83bfc0d40 Perform best effort ssl revocation check on Windows
When performing a request via curl on Windows using schannel, ssl
certificate revocation checks does not handle verification failures
gracefully when an error is encountered that is unrelated to the actual
revocation of a certificate.

A new option is available to perform best effort revocation checks on
curl, so this is enabled by default on the Windows platform. A new
config option (`box_download_disable_ssl_revoke_best_effort`) has also
been added which can be optionally enabled to restore previous behavior
which results in a hard error if any error is encountered.
2023-06-20 16:37:00 -07:00
Chris Roberts
33bc24d9d7
Merge pull request #13194 from chrisroberts/ssh-comm-interactive
Remove keyboard-interactive authentication method
2023-06-02 17:14:23 -07:00
Chris Roberts
41342dceb3 Remove keyboard-interactive authentication method
The keyboard-interactive authentication method was added due to a
mis-reading of a reported issue where the box was not properly
configured for Vagrant. This removes the keyboard-interactive
authentication method which resolves a password prompting issue caused
by its addition.
2023-06-01 17:49:15 -07:00
Chris Roberts
0a20379b1a Enable deprecated key type and host key algorithm
Recent versions of OpenSSH remove support of ssh-rsa key types and host
key algorithms from the default conection configuration. Set options to
enable them and provide a configuration option which can disable them if
required.
2023-05-22 17:09:47 -07:00
Allison Larson
b651c65b54
Merge pull request #13166 from allisonlarson/verify_salt_download
Salt: Verify bootstrap-salt download
2023-05-22 09:54:00 -07:00
Allison Larson
2fa539e499 Salt: Download & verify shasum of default bootstrap-salt file 2023-05-19 16:09:46 -07:00
Allison Larson
ceddf2e6cd
Merge pull request #13153 from allisonlarson/docker_bridge_ip_update
Docker: Attempt using docker command for bridge ip
2023-05-19 09:14:04 -07:00
Allison Larson
12b73a46b2 docker: attempt using docker command for bridge ip
Don't rely on `/sbin/ip` to fetch the docker bridge ip address, instead
first attempt to use the docker command to fetch it. If it fails, fall
back to previous behavior.
2023-05-18 10:54:38 -07:00
Chris Roberts
6234ef021a
Merge pull request #13159 from chrisroberts/unlock-fix
Release file lock before file deletion
2023-05-17 13:40:24 -07:00
Chris Roberts
8e98c5ff1c Update locale preference for the virtualbox driver
Update the locale preference list to prefer UTF-8 variations of `C` when
available.
2023-05-17 11:59:05 -07:00
Chris Roberts
1f26256680 Release file lock before file deletion
When unlocking the file mutex utility always unlock the file prior to
deletion to ensure the file can be properly deleted.
2023-05-17 11:13:10 -07:00
Chris Roberts
d53d8e61bc Fix LANG value used for VirtualBox driver
The VirtualBox driver sets the LANG env var to prevent localized output
being returned when executing CLI commands. If the `locale` command is
present, do a best effort lookup to determine the properly value to use
for the LANG environment variable.
2023-05-15 11:01:29 -07:00
Allison Larson
10e45f1df1 Ignore inactive docker containers when assigning ports
Checks to make sure that a docker container is running before determining
whether or not the port is in use. This prevents the a port on an inactive
container from being treated as if it is use.

Fixes https://github.com/hashicorp/vagrant/issues/13110
2023-05-09 16:44:58 -07:00
Chris Roberts
b77fb6ab4c
Merge pull request #13031 from chrisroberts/redux-eol-macos
Isolate protobuf message loading to server mode
2023-03-15 15:05:44 -07:00
Sophia Castellarin
72dab76707
Merge pull request #13057 from soapy1/box-race-condition
Add a file mutex when downloading box files.
2023-02-22 15:02:13 -08:00
sophia
4551b8b2ad Use file locks to avoid file existance checking race conditions 2023-02-22 14:28:00 -08:00