221 Commits

Author SHA1 Message Date
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
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
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
sophia
4551b8b2ad Use file locks to avoid file existance checking race conditions 2023-02-22 14:28:00 -08:00
sophia
f153996b2d Add tests for mutex util module 2023-01-13 14:08:27 -08:00
sophia
83efa09dfa Test box download mutex 2023-01-12 16:30:05 -08:00
sophia
df94a36568 Patch fake_ftp for determining the size of files 2022-08-01 11:30:29 -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
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07:00
sophia
b480790a8d Add box directly with authed urls 2021-04-05 16:39:01 -05:00
Connor Martin
e041bc7998 add checksum test 2021-03-11 17:47:08 -06:00
Sophia Castellarin
181b4ea890
Merge pull request #12177 from soapy1/apply-download-opts-to-metadata
Apply download options to metadata requests
2021-02-23 13:26:53 -06:00
sophia
4b67216d71 Raise error if downloading box metadata fails 2021-02-12 17:07:04 -06:00
sophia
44f527ff8e Apply download options to metadata requests 2021-02-09 18:33:20 -06:00
sophia
8a8eff130a Allow entity to support content disposition 2020-10-28 16:21:42 -05:00
sophia
4cdf60cb0a Create MIME type data 2020-10-28 15:57:45 -05:00
Rui Lopes
fcdc63ff89 let the user configure the cloud_init mime part content-disposition filename 2020-10-28 15:57:45 -05:00
Sophia Castellarin
70d37e8a9c
Merge pull request #11835 from soapy1/remove-url-token
Download a box by setting auth headers
2020-09-22 15:35:30 -05:00
sophia
f9b1d52ec6 Catch error for when guest is not available 2020-09-10 16:28:38 -05:00
Sophia Castellarin
3835da3839
Merge pull request #11797 from soapy1/synced-folder-caps
Synced folder caps for mount options and default fstab modification behaviour
2020-08-21 11:44:15 -05:00
sophia
fffc555faf Add tests for new hook 2020-08-21 10:54:43 -05:00
sophia
bb5d0e9c28 Remove credentials scrubbing from caching synced folders
Passwords are (and should) never stored be as part of folder data.
I think there is also a case to be made about desensitizes
information here can lead to leaking of credentials. For example if
an exported folder is named "vagrant" and the users password is
"vagrant", the synced_folder cache will show "****" in place of the
folder name, indicating that it is also password.
2020-08-19 17:43:22 -05:00
Chris Roberts
cd2d84fda7 Adjust synced folder collection class 2020-08-19 15:00:40 -05:00
sophia
2a8372a272 Add mount type cap 2020-08-19 15:00:40 -05:00
sophia
bc898e385d Update tests for synced folder typed hash 2020-08-19 15:00:40 -05:00
Chris Roberts
e9ece2ab58
Merge pull request #11814 from chrisroberts/f-dep-warns
Updates to address all Ruby deprecations and warnings
2020-08-12 09:07:10 -07:00
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
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
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