Chris Roberts
414184b76b
guests/rhel: Update network configuration
...
Properly detects NetworkManager on guest as well as devices controlled
by NetworkManager. Provides configuration option to enable/disbale
NetworkManager control on devices.
2017-04-26 13:15:33 -07:00
Chris Roberts
2acded113c
Retry SSH connection on Errno::ECONNABORTED
...
In some cases the SSH connection may be aborted while waiting
for setup. This includes aborted connections in the list of
applicable exceptions to retry on while waiting for the connection
to become available.
Fixes #8520
2017-04-25 13:38:24 -07:00
Chris Roberts
a8b2f78f59
Do not prefix Windows paths if UNC prefix already exists
...
While VirtualBox has commented that they do not support UNC remote
paths (but do for long paths) it seems that remote paths can work.
If user provides UNC path, allow it to be used as-is.
Fixes #7011
2017-04-20 16:33:38 -07:00
Chris Roberts
60187f2b17
Merge pull request #8503 from chrisroberts/fix/box-add-spaces
...
Unescape url to provide actual local path when adding box
2017-04-20 16:10:01 -07:00
Chris Roberts
7d1c77f523
Unescape url to provide actual local path when adding box
...
Fixes #6825
2017-04-20 15:37:08 -07:00
Chris Roberts
82ca8f8058
Support port checker methods which only accept the host port
...
When calling the port_checker an arity check is done to determine
if the helper accepts the host_ip and host_port or only the host_port.
Fixes #8423
2017-04-19 10:49:27 -07:00
Chris Roberts
4d0ecc14f7
Merge pull request #7797 from lukebakken/features/lrb/better-windows-admin-detection
...
Improve user permission detection on Windows
2017-04-17 14:37:43 -07:00
Chris Roberts
6aafe3255a
Force wrappers to be generated to prevent invalid version parsing
2017-04-06 16:52:10 -07:00
Chris Roberts
df069deac0
Validate plugin sources and report errors if detected.
2017-04-04 17:53:04 -07:00
Chris Roberts
bfc2af4cf9
Always provide timeout on thread join to prevent deadlock errors
2017-03-27 12:58:39 -07:00
Chris Roberts
2f4181bad8
Merge pull request #8401 from chrisroberts/bundler/prevent-source-paths
...
Prevent adding local paths to RubyGems sources list
2017-03-23 09:46:08 -07:00
Chris Roberts
127d627218
Merge pull request #8400 from chrisroberts/plugins/warn-on-load-fail
...
Warn when failing to require plugin instead of hard failure
2017-03-23 09:44:32 -07:00
Chris Roberts
052ff53642
Merge pull request #8399 from chrisroberts/fix/port-check
...
Use 127.0.0.1 for host IP when unset and 0.0.0.0 is not available
2017-03-23 09:37:33 -07:00
Chris Roberts
154c3be0d4
Join command with given arguments before running exec
...
This resolves issues where directly passing arguments individually
to Kernel.exec causes encoding errors due to arguments being forced
command/shell encoding which is not always correct.
2017-03-23 09:19:26 -07:00
Chris Roberts
c555e4b72f
Remove subprocess command string re-encoding to default external
2017-03-23 09:16:27 -07:00
Chris Roberts
564ed7456d
Warn when failing to require plugin instead of hard failure
2017-03-22 16:40:42 -07:00
Chris Roberts
354c1c2b51
Prevent adding local paths to RubyGems sources list
2017-03-22 16:36:42 -07:00
Chris Roberts
5cd95b684f
Use 127.0.0.1 for host IP when unset and 0.0.0.0 is not available
2017-03-22 16:31:46 -07:00
Chris Roberts
72d0eb497d
Isolate push deprecation to atlas strategy only
2017-03-21 15:08:17 -07:00
Chris Roberts
eed7b859ca
Fix provision action for provisioners set to never.
...
This updates the behavior of the provision action to never run a provisioner
that is specified to "never" run unless it has been explicitly requested. Also
adds test coverage to the provision action.
2017-03-13 13:53:31 -07:00
Chris Roberts
334e4f5d9d
Convert type for other provider compatibility
2017-03-09 10:28:41 -08:00
Chris Roberts
9d1ec938ef
Merge pull request #8341 from chrisroberts/enhancement/prerelease
...
Support spec prerelease matching
2017-03-07 15:02:17 -08:00
Chris Roberts
c03ca851b1
Merge pull request #8327 from chrisroberts/plugins/local-path
...
Force path as preferred source on local install
2017-03-07 15:00:39 -08:00
Chris Roberts
7610ecfcba
Allow prerelease matches on vagrant spec when running instance is prerelease
2017-03-07 10:36:35 -08:00
Chris Roberts
abf38106c0
Add shared helper method to detect if running version is prerelease
2017-03-07 10:36:14 -08:00
Chris Roberts
009ca94167
Sort result of BoxCollection#all
2017-03-06 08:19:02 -08:00
Chris Roberts
10cd188688
Merge pull request #7956 from phyber/early_box_version_sort
...
Fix box sorting in box_collection
2017-03-03 16:32:01 -08:00
Chris Roberts
6d3ab39b27
Merge pull request #7035 from pravinchandar/4608
...
Fix for #4608 : Support for port forwarding in an IP aliased environment
2017-03-03 15:57:04 -08:00
Chris Roberts
96204383c7
Force path as preferred source on local install
2017-03-03 09:12:44 -08:00
Chris Roberts
86af6501ed
Remove installer set push from default source push
2017-02-24 08:02:22 -08:00
Chris Roberts
e2acb5250a
Add command deprecation helper module
2017-02-24 06:22:39 -08:00
Chris Roberts
ccdccf06b5
Merge pull request #8194 from chrisroberts/fix/curl-credentials
...
Scrub credentials from box URLs
2017-02-23 13:51:47 -08:00
Chris Roberts
74438cc495
Merge pull request #8196 from chrisroberts/fix/expand-vagrantfile-path
...
Allow VAGRANT_DOTFILE_PATH to be expanded as expected.
2017-02-23 13:33:07 -08:00
Chris Roberts
fe055d57da
Merge pull request #8273 from chrisroberts/bundler/remote-source
...
Prefer given source if available when installing plugin
2017-02-22 11:48:19 -08:00
Chris Roberts
088829de9b
Merge pull request #8270 from chrisroberts/enhancement/process-stop
...
Add new methods to Subprocess
2017-02-16 13:45:25 -08:00
Chris Roberts
70cacb27fa
Prefer given source if available when installing plugin
2017-02-09 17:22:48 -08:00
Chris Roberts
6a4d41d0c9
Merge pull request #8252 from nsidc/fix-install-local-pre
...
Add gem_version to plugin_info for local installs
2017-02-09 09:48:54 -08:00
Chris Roberts
e7e24ee853
Merge pull request #8248 from chrisroberts/fix/env-gems-path
...
Fix environment gems_path location
2017-02-08 14:18:41 -08:00
Chris Roberts
903428e569
Add Util::Subprocess#stop and Util::Subprocess#running?
2017-02-08 14:15:47 -08:00
Michael Brandt
be63ace50f
Add gem_version to plugin_info for local installs
2017-02-02 17:58:29 -07:00
Chris Roberts
0a6d985f89
Merge pull request #8191 from chrisroberts/plugins/ext-dir
...
Set base directory to parent directory within plugin specs
2017-02-01 13:12:27 -08:00
Chris Roberts
959bdada82
Fix environment gems_path location
2017-02-01 12:43:16 -08:00
Chris Roberts
25a2bdd279
Prevent generating environment variables with invalid empty names
2017-01-12 15:12:41 -08:00
Chris Roberts
832c62f2aa
Allow VAGRANT_DOTFILE_PATH to be expanded as expected.
...
This allows custom paths that include special characters like `~`
to be properly expanded instead of resulting in joined root path
with special characters included.
2017-01-12 14:01:25 -08:00
Chris Roberts
a055978d74
Scrub credentials from box URLs
2017-01-12 13:24:46 -08:00
Chris Roberts
df00edf1a7
Set base directory to parent directory within plugin specs
...
This adjustment allows for extensions to be properly discovered after
plugin gem specifications have been activated.
2017-01-06 12:55:13 -08:00
Chris Roberts
23c41f4461
Merge pull request #7867 from bbrala/hyperv-package
...
Package Hyper-V boxes
2016-12-07 13:37:47 -08:00
Chris Roberts
23b4421309
Merge pull request #8094 from chrisroberts/bundler/env
...
Remove direct bundler usage within Env util
2016-12-07 06:56:01 -08:00
Chris Roberts
c20e160295
Remove direct bundler usage within Env util
2016-12-07 06:00:56 -08:00
Chris Roberts
c8d564e578
Prevent interaction when removing plugin gems
2016-12-06 07:07:52 -08:00
Chris Roberts
5b1b18d01a
Merge pull request #8068 from chrisroberts/bundler/install-solution-act
...
Detect load failure within solution set and retry if found
2016-12-05 13:28:58 -08:00
Chris Roberts
3dccd82a39
Explicitly require name_tuple
...
This does not get automatically loaded before usage so ensure
it is properly loaded for plugin usage.
2016-12-05 09:35:02 -08:00
Chris Roberts
ce35611c34
Detect load failure within solution set and retry if found
...
Installation solution sets in 2.2.5 can end up out of order (not seen
in 2.3.1) causing LoadErrors when the specification is in the solution
set during validation. This detects the missing spec within the solution
and if found will move spec to the start of the solution set and retry
solution activation.
2016-12-01 08:15:04 -08:00
Chris Roberts
9717432920
Add logger output when plugin loading is disabled
2016-11-28 16:55:38 -08:00
Chris Roberts
f1e623976b
Do not include default specifications within dependencies
2016-11-28 16:54:59 -08:00
Chris Roberts
d87cf25ed2
Display original exception and backtraces in logger output
2016-11-28 07:48:16 -08:00
Chris Roberts
2cc4b82198
Only read default specifications directory when within bundler context
2016-11-22 08:26:43 -08:00
Chris Roberts
a51949933f
Always apply builtin constraints within dependency restrictions
...
Include detection of running context (within Bundler or not) and
load the "buitin" gems based on that context.
2016-11-22 07:53:19 -08:00
Chris Roberts
53b9f1747c
Allow plugin_init_error to provide all information. Include final reset on specifications.
2016-11-17 16:40:51 -08:00
Chris Roberts
818f7acb7b
Provide better internal consistency of installed plugin gems.
...
Refactors reusable actions into isolated methods. Supports installation/removal
without activation to prevent unintended conflicts during upgrades and cleanup.
Introduced custom resolver set to handle multiple installed versions of gems
which enables proper cleanup.
2016-11-16 13:26:13 -08:00
Chris Roberts
06e1b2f52c
Include installed gem version plugin information. Clean after install and update.
2016-11-16 13:19:43 -08:00
Chris Roberts
fb85bb1c7b
Include plugin initialization error class
2016-11-16 13:18:35 -08:00
Chris Roberts
33c9d6183a
Provide more log information about configured plugins
2016-11-16 13:17:38 -08:00
Chris Roberts
e2d96f942f
Provide nice error output when plugin initialization fails
...
Include extra logging during initialization to display error if encountered
and solution set prior to performing activations.
2016-11-15 15:50:39 -08:00
Chris Roberts
44d3aedc5b
When bundler is in use, require `:plugins` group
2016-11-14 15:28:22 -08:00
Chris Roberts
ac74774fcb
Merge pull request #8000 from chrisroberts/plugins/updates
...
Plugin handling updates
2016-11-14 13:24:52 -08:00
Chris Roberts
0f720a4386
Merge pull request #7985 from chrisroberts/shell-provisioner/checksum
...
Add md5 and sha1 checksum support to Downloader.
2016-11-14 13:19:22 -08:00
Chris Roberts
beffa70941
Downloader checksum output information and digester usage
...
Add more output information around type of checksum being validated.
Use builtin Digest#file to read target file for generation of hexdigest.
2016-11-14 10:22:25 -08:00
Chris Roberts
174fe65d66
Sort plugins by name when generating install list
2016-11-11 15:11:45 -08:00
Chris Roberts
3edd0b57e9
Add debug logging output to Bundler implementation
2016-11-11 15:08:59 -08:00
Chris Roberts
bd3f0c442c
Only use Gem sources that are provided
2016-11-11 14:50:20 -08:00
Chris Roberts
1691e3af58
Only install from defined sources unless install is local
2016-11-11 14:44:14 -08:00
Chris Roberts
d8455c0a9a
Add custom sources if not included
2016-11-11 14:33:26 -08:00
Chris Roberts
6e40d46c50
Fix up local gem plugin installation when not published remotely
2016-11-11 14:25:03 -08:00
Chris Roberts
ea13988367
Properly support plugin auto-loading with logging information
2016-11-11 14:24:25 -08:00
Chris Roberts
1ed27faa9f
Remove usage of $vagrant_bundler_runtime within enabled check
2016-11-11 14:23:55 -08:00
Chris Roberts
da45ca707c
Add md5 and sha1 checksum support to Downloader.
...
Allows checksum validation on downloaded files via Util::Downloader
using MD5 and/or SHA1 checksums. This also integrates checksum validation
support with the shell provisioner for downloaded remote files.
2016-11-09 16:05:39 -08:00
Chris Roberts
36d88ee268
Track installed gem version and display in startup logger information
2016-11-07 20:16:46 -08:00
Chris Roberts
1f5dd35d16
Remove bundler where no longer required
2016-11-07 20:00:38 -08:00
Chris Roberts
3fb5913af1
Update .init! to attempt repair if instructed
2016-11-07 18:48:51 -08:00
Chris Roberts
d5c5561302
Allow disable of user plugins if repair command is requested
2016-11-07 18:48:51 -08:00
Chris Roberts
1fb4553d14
[core] Remove bundler usage for plugin management
2016-11-07 18:48:51 -08:00
David O'Rourke
a33892e4df
Maintain a version dir map in box_collection.
...
This is required since Gem::Version will mangle pre-release version
numbers.
To get around this, we keep a mapping of
`Gem::Version.to_s => versiondir.`
This allows us to properly sort by version when picking a box while
still returning pristine versiondirs when required.
2016-11-01 15:59:23 +00:00
David O'Rourke
7b89374dce
Fix version sorting in box_collection.rb
2016-11-01 14:57:06 +00:00
Chris Roberts
d1a778dbfb
Include error handling when subprocess commands fail
2016-10-31 07:42:30 -07:00
Chris Roberts
d490bb4b7a
Include autoloader for StringBlockEditor
2016-10-29 17:53:45 -07:00
Chris Roberts
c39b3fbb76
guests/openbsd: Check package installation after installing package
...
The `pkg_add` command will return `0` when a package requested for
installation is not found. This adds a validation check to ensure
the rsync package is actually installed on the guest.
2016-10-25 12:16:52 -07:00
Luke Bakken
52e98ffdfb
Improve detection of admin and hyper-v admin rights via using SIDs and powershell
2016-10-13 14:22:08 -07:00
Chris Roberts
28f2ed56cf
Merge pull request #7756 from alexoj/master
...
Fix Vagrant not prioritizing configured providers correctly
2016-10-07 17:14:54 -07:00
Björn Brala
6ed612e93b
Move package_setup_files to general lib to minimize code duplication
2016-10-07 17:31:15 +02:00
Bjorn Brala
5877e8fe22
Sart refactor duplicate classes
2016-10-06 08:55:59 +02:00
Chris Roberts
c3eb1e355b
Merge pull request #7802 from chrisroberts/safe_exec/windows
...
[windows] Use subprocess for safe_exec on windows
2016-09-30 14:42:40 -07:00
Chris Roberts
977733790a
Include debug notification when using subprocess
2016-09-30 12:16:53 -07:00
Chris Roberts
5872611d59
[windows] Use subprocess for safe_exec on windows
2016-09-15 13:08:58 -07:00
Jake Teton-Landis
ceb69e6266
Allow closing a Vagrant::Util::Subprocess's STDIN
...
Previously, there was no way to close the STDIN stream of a subprocess,
so commands that read from stdin in a subprocess would hang forever,
such as `/bin/sh -s`. If one tried to close the stdin, the
IO.select() call in Subprocess#execute would raise an error for calling
select() on a closed IO.
Here's a concrete example of a command that needs to close STDIN to work
properly:
```ruby
script = SOME_VERY_LONG_STRING
command = %w(ssh foo.example.com /bin/sh -s foo bar)
result = ::Vagrant::Util::Subprocess.execute(*command) do |type, data_or_io|
if type == :stdin
data_or_io.write(script)
data_or_io.write("\n")
data_or_io.close
next
end
puts "Remote: #{data_or_io}"
end
```
2016-09-04 16:45:38 -07:00
Alejandro Ojeda
50ca748b5c
Fix Vagrant not prioritizing configured providers correctly
...
Fixes #7135 : config.vm.provider not setting provider in multi-machine Vagrantfile
2016-08-25 03:34:23 +02:00
Chris Roberts
3abfbec5a6
Merge pull request #7623 from carlosefr/relative-dotfile-path
...
Support Vagrantfile-relative VAGRANT_DOTFILE_PATHs
2016-08-12 16:17:10 -07:00
Zack Train
cb70749bd8
redux of pr 7398 for ssh-agent key fix
2016-08-11 11:48:10 -07:00
Seth Vargo
1702584d1e
Merge pull request #6765 from PeterMosmans/windows-path-fix
...
Fix for #6761 (fixes incomplete #6598 )
2016-08-08 11:59:26 -04:00
Carlos Rodrigues
218b697d5e
This looks cleaner
2016-07-24 19:01:54 +01:00