Commit Graph

3727 Commits

Author SHA1 Message Date
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
Chris Roberts c0eaac791d Write metadata file to box contents during package
If the provider does not include a metadata.json file prior to
compressing the box, determine current provider and write
metadata.json file before compressing.
2019-02-28 15:31:49 -08:00
Brian Cain 6b9cdb4e48
Fixes #10663: Ignore boxes in collection with malformed version numbers
Prior to this commit, if a box some how got on disk that had an
incorrect or invalid version number that did not match Gem::Version,
Vagrant would throw an exception when attempting to generate a list of
the boxes on disk. This commit fixes that by looking at the version from
the path generated, and shows a warning to the user about the box and
skips it from the list so they at least know about the problematic box
and can still get a list of boxes.
2019-02-14 15:30:11 -08:00
Chris Roberts 7e47602e3d Wrap output in thread when being called from within trap-context
This prevents a ThreadError exception being raised on sigint which
resulted in a stacktrace being dumped.
2019-02-12 16:06:16 -08:00
Brian Cain 26d05130c4
Merge pull request #10647 from chrisroberts/f-appimage-ld
Use ld path with appimage libs on suffix
2019-02-12 09:58:53 -08:00
Chris Roberts a4eb002750 Use ld path of system libs with appimage libs suffixed 2019-02-04 12:52:55 -08:00
Brian Cain 08214ec90f
Ensure action param is a symbol, and if nil return to do nothing 2019-02-01 13:34:15 -08:00
Brian Cain 6ac23f1a15
Add fire trigger test for cli class 2019-02-01 13:34:15 -08:00
Brian Cain 071d8b09cd
Add machine for hook and action triggers 2019-02-01 13:34:15 -08:00
Brian Cain 16b5ad74ca
Handle command triggers with run_remote options
This commit adds some handling around when a machine does not exist at
all but a trigger was defined with a run_remote option
2019-02-01 13:34:15 -08:00
Brian Cain 5e4850a0d2
Use name instead of class 2019-02-01 13:34:15 -08:00
Brian Cain ec9bda78c3
Remove comment 2019-02-01 13:34:15 -08:00
Brian Cain ae0960f2da
Add comment to wardens finalize_action method 2019-02-01 13:34:15 -08:00
Brian Cain ebacb96626
Update docs for action trigger actions 2019-02-01 13:34:15 -08:00