493 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
51adb12547 Add architecture support for boxes
Introduce support for handling box architecture. Adds a new
`box_architecture` setting that defaults to `:auto` which will perform
automatic detection of the host system, but can be overridden with a
custom value. Can also be set to `nil` which will result in it fetching
the box flagged with the default architecture within the metadata.

Box collection has been modified to allow existing boxes already
downloaded and unpacked to still function as expected when architecture
information is not available.
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
b91a5d5576 Add file mutex util module 2023-01-13 12:00:46 -08:00
sophia
817fbdd2d1 Add information about lock file path 2023-01-12 16:34:45 -08:00
sophia
bc03f21758 Add a file mutex when downloading box files.
Box's are global to Vagrant. Multiple Vagrant process can all
access the box directory for both downloading and extracting boxes.
A file mutex will ensure that mulitple Vagrant process will not
trample eachother if they are trying to download the same box.
2023-01-12 15:30:06 -08:00
sophia
b17c36c7c7 Fix typo 2022-07-07 12:30:24 -05:00
sophia
66524426d0
Update ruby remote box metadata for proto changes 2022-04-25 12:26:53 -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
Paul Hinze
fda2bcf0cd
Refactor SSHRun action to make room for remote overrides 2022-04-25 12:26:48 -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
90033b9b68
Only prepend remote mixin synced folders when running in remote mode 2022-04-25 12:26:13 -05:00
sophia
083fe5ea82
Setup remote mixin synced folder module 2022-04-25 12:26:07 -05:00
sophia
b480790a8d Add box directly with authed urls 2021-04-05 16:39:01 -05:00
Connor Martin
e92fe5d720 Merge branch 'main' of github.com:hashicorp/vagrant into remove-space 2021-03-11 17:20:57 -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
Connor Martin
3f70d44266 assign to a new var 2021-02-12 09:31:32 -06:00
sophia
44f527ff8e Apply download options to metadata requests 2021-02-09 18:33:20 -06:00
Connor Martin
9a26940114 use strip instead 2021-02-04 14:29:54 -06:00
Connor Martin
1022e5b991 remove all space from checksums 2021-02-01 21:54:10 -06:00
sophia
4cdf60cb0a Create MIME type data 2020-10-28 15:57:45 -05:00
sophia
e2f71dd55d Update mime gem 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
e96d60c029 Add tests for persisting shared folders 2020-08-20 18:24:09 -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
sophia
56fa014af8 Don't persist shared folders if mount options capability not provided 2020-08-19 15:47:21 -05:00
Chris Roberts
cd2d84fda7 Adjust synced folder collection class 2020-08-19 15:00:40 -05:00
sophia
7577c11eb6 Persist synced folders in action 2020-08-19 15:00:40 -05:00
sophia
1a3136b9fe Allow types to be specified when instantiating a typed hash 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
sophia
2239ee8582 Create Hash with type attribute 2020-08-19 15:00:40 -05:00
sophia
cde39e26ba Make mount options a synced_folder capability 2020-08-19 15:00:40 -05:00
sophia
0d1635303f Sperate hook for authenticating url and adding headers for authentication 2020-08-18 17:42:59 -05:00
sophia
b5f6df9ec0 Download a box by setting auth headers 2020-08-18 10:13:39 -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
Sophia Castellarin
b41db6bebe Output cloud init messages to user
Co-authored-by: Jeff Bonhag <jbonhag@hashicorp.com>
2020-07-31 12:10:43 -05:00