Commit Graph

3740 Commits

Author SHA1 Message Date
Brian Cain efd3a62ffe
Fixes #11207: Do not validate checksums if options are empty string
Prior to this commit, if Vagrant received checksum options from Vagrant
Cloud that were simply empty strings, it would try to validate its
checksum with those options. This commit fixes that by ignoring empty
string values.
2019-11-21 09:56:58 -08:00
Jeff Bonhag 0e68f02dc9
Fixes #11163: Get latest version for provider (#11192)
This commit changes the behavior of `vagrant box outdated --global` so
it gets the latest version for the current machine's provider, rather
than the latest version for any provider.
2019-11-13 17:33:15 -05:00
Brian Cain 39ea1af5ab
Merge pull request #11183 from briancain/fixup/include-errors-in-checksum-util
Fixes #11179: Ensure Vagrant::Errors are loaded in file_checksum util
2019-11-12 09:06:49 -08:00
Jeff Bonhag a39a7ae794
Fixes #10741: Check if update is available locally (#11188)
This commit checks the local box collection to see if the latest box
update has already been downloaded.  If it has, Vagrant will display the
destroy/recreate message instead of the "run vagrant update" message.
2019-11-12 11:41:10 -05:00
Brian Cain 44c6f655be
Fixes #11179: Ensure Vagrant::Errors are loaded in file_checksum util
Prior to this commit, the file_checksum class used the `Vagrant::Errors`
class as if it were apart of the Vagrant module. However, since the
file_checksum class is an interface and not part of the Vagrant module,
it doesn't have access to that Error class like other Vagrant modules.
This commit fixes that by ensuring the `"vagrant/errors"` class is
loaded, and that the proper namespace is used.
2019-11-07 09:22:17 -08:00
Chris Roberts 318dca294a Ensure empty message values are properly formatted 2019-10-15 08:54:24 -07:00
Chris Roberts 783f5fc65d Update UI to properly retain newlines when adding prefix
When using a Prefixed UI instance prevent new line characters from
being removed when adding prefix formatting to output messages.

Fixes #11044
2019-10-14 16:56:40 -07:00
Chris Roberts 13654dcc37 Update box checksum logic to use that supplied from FileChecksum 2019-10-08 11:23:48 -07:00
Chris Roberts 9ee5ce4817 Remove checksum from downloader and replace with FileChecksum
Remove checksum implementation within the Util::Downloader and
relocate it into the FileChecksum helper class. Update Downloader
to use FileChecksum.
2019-10-08 11:23:48 -07:00
Chris Roberts 7fb81bcea1 Add support for other checksum types 2019-10-08 11:23:48 -07:00
Brian Cain ace67ccdeb
Remove platform require since it is no longer required in file 2019-09-10 13:28:37 -07:00
Brian Cain a22acba467
Simplify line and path checks for exception handling in config loading 2019-09-10 13:27:23 -07:00
Brian Cain ccf99d8c0c
Fixes #11022: Show proper path & letter drive on exceptions for windows
Prior to this commit, vagrant was not grabbing all of the tokens on
Windows for showing the full drive because the ruby api for it behaves
differenly on windows compared to other platforms. This commit changes
that by ensuring the letter drive is attached to the path when showing
an exception.
2019-09-06 13:37:38 -07:00
Brian Cain f74239bed9
Merge pull request #11043 from briancain/provisioner-enhancements
Introduce new Provisioner options: before and after
2019-09-06 08:52:40 -07:00
Brian Cain e19f54457d
Fixes #10908: Preserve in-use boxes when force flag is used with prune
Prior to this commit, `vagrant box prune --force` would not prompt a
user to prune Vagrant boxes, even if that box was in use. There was no
way to prune boxes, ignore the prompt, but keep in-use boxes. This
commit adds a new flag that can be combined with `--force`, that will
keep in-use boxes but prune older boxes without prompting the user.
2019-09-04 15:54:11 -07:00
Brian Cain 7b0dc8d528
Update provisioner enhancements from pull request feedback 2019-08-29 13:50:22 -07:00
Brian Cain 160ee09da2
Cleanup sorting method for provisioner sorting 2019-08-28 14:32:51 -07:00
Brian Cain c1f0bd638d
Insert _at_ index, rather than before
Inserting at the right index places new item *before* the index, so no
need to decrement and then insert, since `insert` takes care of shifting
down elements of the array.
2019-08-28 14:11:25 -07:00
Brian Cain 271d427c57
Fix bug in :each provisioner sorting
Ensure each provisioners are properly inserted into the final
provisioner array
2019-08-27 14:28:06 -07:00
Brian Cain c189e4d255
Redo how each provisioners are sorted 2019-08-26 16:05:02 -07:00
Brian Cain 28ef368881
Begin to add tests for mixin provisioner 2019-08-26 12:03:36 -07:00
Brian Cain ef82c0a5bc
Move return earlier 2019-08-22 12:01:19 -07:00
Brian Cain be5964a1db
Add basic provisioner sorting 2019-08-21 14:44:16 -07:00
Brian Cain 6777493c46
Include before/after options in final provision hash 2019-08-20 11:31:00 -07:00
Chris Roberts 7fbe8bcabc Fix plugin discovery loading when no data directory is available
If the local data directory is unavailable, there will be no local
file to use within the plugin manager. Check for local file before
returning result, otherwise just return an empty hash.
2019-06-21 11:15:39 -07:00
Chris Roberts 7c6b2963c3
Merge pull request #10911 from chrisroberts/f-plugin-loading
Support loading machine configuration without provider validation
2019-06-20 11:23:10 -07:00
Zhongcheng Lao caae214bf7 Fix provider name not work when specified
Provider name should be symbol in guess_provider.
2019-06-17 08:22:50 +08:00
Chris Roberts 9bae0a7094 Support loading machine configuration without provider validation
Allow Vagrantfile#machine_config to load properly when the requested
provider may not be currently available. Update the Environment to
utilize this when searching for plugin information to properly allow
box provided Vagrantfiles to define required plugins.
2019-06-14 11:50:06 -07:00
Chris Roberts bbd75ef25a
Merge pull request #10896 from chrisroberts/f-plugin-constraints
Properly generate dependency instance when multiple constraints provided
2019-06-05 14:01:48 -07:00
Chris Roberts b90d01377e
Merge pull request #10894 from chrisroberts/e-deps-system
Handle strict dependency enforcement when installed within system
2019-06-05 14:00:07 -07:00
Chris Roberts 2507b68045
Merge pull request #10891 from chrisroberts/f-trigger-multithread
Update trigger abort behavior when running parallel actions
2019-06-05 13:58:44 -07:00
Chris Roberts f5f89f72b7
Merge pull request #10889 from chrisroberts/f-local-plugins-boxfile
Support loading plugin information from nested Vagrantfiles
2019-06-05 13:56:29 -07:00
Chris Roberts 109214f89d Properly generate dependency instance when multiple constraints provided 2019-06-05 13:46:42 -07:00
Chris Roberts 07b9f39a54 Clean up gem sources modifications
Based on suggestions from @zenspider here:
3daf3e532d (r33408747)
2019-06-05 09:36:37 -07:00
Chris Roberts 062ef52816 Handle strict dependency enforcement when installed within system
When installed outside of the official installer and not running
within a bundler environment, properly activate core dependencies
and properly enforce constraints.
2019-06-05 07:45:07 -07: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
Chris Roberts 0cba5263ad
Merge pull request #10811 from chrisroberts/f-synced-folder-creds
Remove configuration information from SMB synced folder data
2019-06-04 11:33:33 -07:00
Chris Roberts 50c4464d44 Support loading plugin information from nested Vagrantfiles
Since plugin installation happens when the environment is first
initialized, attempt to determine the provider in use and load
any box provided Vagrantfiles to include any plugin configuration
they may include.
2019-06-04 10:07:02 -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 86800421db
Merge pull request #10824 from briancain/exit-process-on-abort-triggers
Fixes #10823: Use Process.exit! for abort trigger option
2019-05-08 09:15:51 -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
Chris Roberts 5b94bbb49b Scrub folder configuration data when persisting to disk
Before writing synced folder configuration data to the local
data directory run content through the credential scrubber to
remove any sensitive content before write.
2019-04-25 10:31:48 -07:00
Brian Cain 757175b94e
Add note about removing patch fix and add test 2019-04-22 10:36:25 -07:00
Brian Cain e2097be55e
Fixes #10800, Fixes #9148: Ensure rubygems is loading gemrc properly on Windows
Prior to this commit, when Vagrant attempted to use the Gem library, it
would attempt to pass in a gemrc through an environment variable that
the rubygems library would try to split and parse. This is normally
fine, as the method in question would return empty if that file did not
exist. However if the user had a file that matches the drive that
Vagrant was installed on, rubygems would fail saying the folder was not
a file (or a gemrc, in this case).

This commit works around that by instead configuring the gemrc location
through ruby with `Gem.configuration`.

Related rubygems issue
[#2733](https://github.com/rubygems/rubygems/issues/2733)
2019-04-19 17:07:49 -07:00
Brian Cain 8e9578cf5d
Merge pull request #10752 from chrisroberts/f-coreos-guest-caps
Update guest capabilities for coreos
2019-04-09 15:10:58 -07:00
Chris Roberts 8ba69e587c Update guest capabilities for coreos 2019-03-22 15:20:37 -07:00
Brian Cain ee985f9f7f
Fix typo in UI Prefix for trigger UI 2019-03-21 10:11:38 -07:00
Chris Roberts 1c650a7fb8 Remove whitespace from id file on load
If the id file includes whitespace, remove it. If the content of
the id file is empty, do not set the machine id.

Fixes: #10722
2019-03-11 17:08:13 -07:00
Chris Roberts 5dc504b12c
Merge pull request #10706 from chrisroberts/e-package-metadata
Write metadata file to box contents during package
2019-03-04 13:06:24 -08:00
steve-simpson 7b3ca04a6e Added --no-same-owner & --no-same-permissions flags to bsdtar in box_collection.rb 2019-03-01 18:02:37 +00:00