Commit Graph

1954 Commits

Author SHA1 Message Date
Mitchell Hashimoto 1ef679f683 SSH log level fatal. Thanks @petejkim
This change makes it so that SSH errors are shown, whereas QUIET hid
those as well. The main change to QUIET was to get rid of warnings,
not errors, so this fixes that.
2012-05-31 23:42:28 +02:00
Zsolt Takács cac79cf409 preserve attributes on packaging when using ruby 1.9.2
see http://bugs.ruby-lang.org/issues/4507
2012-05-26 16:51:18 -07:00
Matt Callaway 117a9c146a On Linux where IPv6 is disabled, where /etc/hosts has '::1 localhost', a socket connect to localhost 2222 results in ENETUNREACH which needs to be caught as per this patch. 2012-05-25 15:45:18 -05:00
Mitchell Hashimoto d5a7ca6159 config.ssh.shell now contains full shell command
Before, it only contained the shell executable and "-l" was magically
appended to it. However, every shell doesn't support "-l" and maybe "-l"
isn't even the behavior that users want!

Therefore, the config.ssh.shell command must now contain the full
command to execute.
2012-05-23 15:30:16 -07:00
Mitchell Hashimoto de78a3637a Plugin activation
Vagrant is only guaranteeing that the plugin definition superclass (the
Vagrant.plugin("1") part) is backwards compatible. Anything else, such
as Vagrant::Command::Base and so on, will likely change in future
versions. Beacuse of this, plugins should only immediately expose their
definition.

In order to support loading the other classes, plugins should defer
loading to the "activation" phase of a plugin. This can be done using
the `activated` block:

    class MyPlugin < Vagrant.plugin("1")
      name "my plugin"

      activated do
        require "myplugin/my_command"
      end

      command("foo") { MyCommand }
    end

Plugin activation is done at two specific times:

  * Right when a Vagrant::Environment is created and the global plugins
    (such as from ~.vagrantrc) are loaded.
  * Right before loading configuration, but after the Vagrantfiles have
    been evaluated. This allows plugins to be defined within these files
    as well.
2012-05-21 22:23:50 -07:00
Mitchell Hashimoto 3204b3a580 Vagrant.configure and versioned configuration
Vagrant.configure is now how configuration is done in Vagrantfiles
(previously it was Vagrant::Config.run). This function takes a single
argument which is the version of configuration to use.

Various internals were updated for this new versioned configuration.

Note that multiple versions of configuration aren't yet used so aren't
fully supported by Vagrant, but the foundation is being set here.
2012-05-21 21:47:01 -07:00
Mitchell Hashimoto 95e554314e Foundation for supporting multiple version types
I created VersionBase which is the abstract base class for any
configuration versions. Configuration versions are responsible for
knowing how to load configuration given a proc (from a
Vagrant.configure block), as well as merging configuration procs. In the
future, it will have to upgrade versions as well. This is not done yet.

The VERSIONS constant was added to Vagrant::Config which is a registry
to keep track of all the available configuration versions. The
VERSIONS_ORDER constant is an array of the ordering of these versions.
The ordering is important so that in the future Vagrant can attempt to
gracefully upgrade the configurations. It is also used to determine the
current configuration version (which is assumed to be the last version
in the order).

The loader was modified to use the current version and the VERSIONS
registry instead of hardcoding V1.
2012-05-20 17:47:24 -07:00
Mitchell Hashimoto 0f85cb7b74 Log the guest class chosen 2012-05-19 09:32:43 -07:00
Josh Mahowald 174df1edf0 Setting up hostname before setting up the network to minimize issues as described in http://serverfault.com/questions/38114/why-does-sudo-command-take-long-to-execute 2012-05-19 09:17:44 -07:00
Mitchell Hashimoto 73c8299ecd Merge pull request #868 from justinlynn/add_dhcp_default_route_option
Issue #862: Allow bridged networking without removing the interface's DHCP assigned default route
2012-05-06 14:46:58 -07:00
Mitchell Hashimoto 8c6f3edf2d Single-VM mode still allows target name in vagrant commands 2012-05-06 14:33:47 -07:00
Mitchell Hashimoto bc0643613a Vagrant.require_plugin [GH-916] 2012-05-06 14:01:10 -07:00
Mitchell Hashimoto d230f0a41c Environment.rb doesn't need to load in "rubygems" anymore 2012-05-06 13:49:22 -07:00
Mitchell Hashimoto de92f5217c Use `load` for the Vagrantrc, make sure it is only loaded once 2012-05-06 10:09:33 -07:00
Mitchell Hashimoto 0d6248394c Tests for the Easy command base 2012-05-06 10:01:50 -07:00
Mitchell Hashimoto dc4f6e1939 Allow creating multiple easy commands 2012-05-06 09:54:23 -07:00
Ryan LeCompte 2355a4b9a6 fix support for multiple unique easy commands 2012-05-06 01:47:43 -07:00
Mitchell Hashimoto b7854c1ef6 Easy hooks 2012-05-05 22:31:21 -07:00
Mitchell Hashimoto 31ac7271aa Rename EasyCommand namespace to Easy 2012-05-05 22:16:13 -07:00
Mitchell Hashimoto 3d147f1d96 Raise exception if the insert_before middleware is not found 2012-05-05 22:10:26 -07:00
Mitchell Hashimoto 879f98b5d5 Action builder supports indexing middlewares by name 2012-05-05 22:01:53 -07:00
Mitchell Hashimoto c2649074c3 Test command name validation and fix up some bugs 2012-05-05 20:11:26 -07:00
Mitchell Hashimoto e4fa5bb489 Validate that commands only contain proper characters 2012-05-05 20:01:14 -07:00
Mitchell Hashimoto 64ece507ad `download` operation 2012-05-05 19:52:10 -07:00
Mitchell Hashimoto f8ab516082 `upload` operation for easy commands 2012-05-05 19:44:52 -07:00
Mitchell Hashimoto 1d7e02cd63 Build up some operations that can be run.
These are heavily inspired by Fabric! Thanks!
2012-05-05 19:28:50 -07:00
Mitchell Hashimoto 00aba5ac03 Plugin easy commands.
Easy commands are well... easy! They don't offer the full power of
creating a completely custom command class, but they let you do the
basics (what almost everyone needs) with minimal fuss. Example:

class MyPlugin < Vagrant.plugin("1")
  name "my-plugin"

  easy_command "foo" do |action|
    puts "HELLO!"
  end
end

NOTE: The "action" stuff isn't done yet, but will be soon!
2012-05-05 18:57:29 -07:00
Mitchell Hashimoto 8850c086b1 Plugins can now have action_hooks 2012-05-05 18:28:07 -07:00
Mitchell Hashimoto 462136cbf2 Use the .vagrantrc for plugins! 2012-05-05 13:08:07 -07:00
Mitchell Hashimoto d9034da8a4 Remove gem-based plugin loading 2012-05-05 12:57:31 -07:00
Mitchell Hashimoto 3b7030ed2c Merge pull request #905 from LarsFronius/master
Fix for issue #898 - interfaces assigned in wrong order under ruby1.8
2012-05-04 20:52:04 -07:00
Mitchell Hashimoto 359ea23069 Support multiple paths in VBOX_INSTALL_PATH [GH-885] 2012-05-04 20:48:52 -07:00
Mitchell Hashimoto 04df9bc80b Merge pull request #877 from bitprophet/allow-agents-in-plain-mode
Don't use IdentitiesOnly under 'ssh -p'
2012-05-04 20:31:15 -07:00
Jorgen H. Fjeld 6f5a9d13f3 Detect and disable DNS settings that break on Ubuntu 12.04. 2012-05-01 22:24:07 -07:00
Sean Wolfe e10e8aae86 After changing the file permissions, we need to reload the stat before comparing again. Otherwise we will always throw an exception even if we set the permissions successfully. 2012-05-01 13:26:12 -07:00
Lars Fronius 534faeae7c Fixes a bug where interfaces are assigned in a wrong order when using ruby1.8, causing vm boot to stop as documented in issue #898 2012-04-26 21:11:16 +02:00
Mitchell Hashimoto 9956e6d012 Better directory structure for plugins 2012-04-20 16:53:01 -07:00
Mitchell Hashimoto cae80a7716 Make Vagrant::Plugin a module 2012-04-19 21:42:35 -07:00
Mitchell Hashimoto 86a846e445 Remove old command directory 2012-04-19 21:33:26 -07:00
Mitchell Hashimoto 945f3bba67 Remove old commands 2012-04-19 21:29:25 -07:00
Mitchell Hashimoto deb346d5a1 Remove guest subdirectory 2012-04-19 21:28:24 -07:00
Mitchell Hashimoto 3a79aa0beb Remove hosts directory 2012-04-19 21:27:16 -07:00
Mitchell Hashimoto 9593ad3fdb Get rid of provisioners directory 2012-04-19 20:30:14 -07:00
Mitchell Hashimoto 6161c04fcf Fix some issues with commands not referencing proper classes 2012-04-19 14:02:03 -07:00
Mitchell Hashimoto 1489854d70 Move commands into plugins 2012-04-19 13:59:48 -07:00
Mitchell Hashimoto 661f20bb91 Move hosts to a plugin system 2012-04-18 22:20:45 -07:00
Mitchell Hashimoto 1cbac3167f Move provisioners into plugins 2012-04-18 21:53:19 -07:00
Mitchell Hashimoto 0d7b9f84e2 Add logging to v1 plugin registration 2012-04-18 21:32:15 -07:00
Mitchell Hashimoto 1b2fa748f9 Move all guests to plugins, even the distros 2012-04-18 21:23:25 -07:00
Mitchell Hashimoto 7766eb6098 Major guests have been moved to plugins 2012-04-18 21:03:03 -07:00
Mitchell Hashimoto dd459170dd Start moving guest configuration out into plugins 2012-04-18 17:38:20 -07:00
Mitchell Hashimoto a23fee4848 Remove old configuration classes 2012-04-18 17:16:03 -07:00
Mitchell Hashimoto a62e859231 Get rid of the UNSET_VALUE stuff, save it for v2 2012-04-18 17:09:25 -07:00
Mitchell Hashimoto b38fb5e974 Loader uses the new configuration classes 2012-04-18 17:03:34 -07:00
Mitchell Hashimoto 98d6bf958e Move core config into a plugin 2012-04-17 22:12:27 -07:00
Mitchell Hashimoto c0ee3b06ff Config merging 2012-04-17 10:22:24 -07:00
Mitchell Hashimoto 92ee042fc2 V1 config loading using plugins as a source for config keys 2012-04-16 22:26:38 -07:00
Mitchell Hashimoto b46daa82bc Ability to define configuration classes on plugins 2012-04-15 16:04:54 -05:00
Mitchell Hashimoto 2eebc2cb68 Basic Plugin class 2012-04-15 15:34:44 -05:00
Mitchell Hashimoto 4034a2db21 `vagrant destroy` works in "guru meditation" state 2012-04-12 10:18:34 -07:00
Jeff Forcier e35fac0986 Protip, don't apply changes from old released versions to master 2012-04-09 18:01:03 -07:00
Jeff Forcier 59852e79de Don't use IdentitiesOnly under 'ssh -p' 2012-04-09 17:57:41 -07:00
Justin Lynn a20ee32c9a Need to correctly configure the template's options.
pull the config through the bridged interface configuration routine

template debugging

add another test line

set the setting in the correct areas, yay dynamic method calls
2012-04-05 10:58:58 -07:00
Justin Lynn bf3d3b0245 add use_dhcp_assigned_default_route setting to allow for dhcp bridged interfaces which have a default route assigned by dhcp 2012-04-05 09:21:09 -07:00
Mitchell Hashimoto 00c4193b43 Merge pull request #856 from stevehodgkiss/fix_error_when_changing_users
Cleanup any tmp files set by vagrant to fix a permissions issue when switching users.
2012-04-03 21:56:16 -07:00
Mitchell Hashimoto e98cedf0e1 LogLevel QUIET for SSH to suppress known hosts warning [GH-847] 2012-04-02 09:57:16 -07:00
Mitchell Hashimoto 285a07ebb3 Don't use unless 2012-04-02 09:55:39 -07:00
Steve Hodgkiss 3561c1c5ba Guests should clean up after themselves 2012-04-02 17:33:54 +10:00
Steve Hodgkiss 092e8a95b3 Cleanup any tmp files set by vagrant to fix a permissions issue when switching users. 2012-04-02 14:56:43 +10:00
David Calavera e8c5cf09db fix reading information method for vbox 4.1 2012-03-31 18:58:02 -07:00
David Calavera b0e6085c0b Fix importing progress status check 2012-03-31 18:50:45 -07:00
David Calavera 73b31b5a3b fix regexp matchers 2012-03-30 19:36:35 -07:00
David Calavera eb07788db1 Remove global variables 2012-03-30 19:36:26 -07:00
Mitchell Hashimoto 1782acdf2e Fix up some stuff from previous pull request 2012-03-30 19:31:03 -07:00
Hunter Morris db6cd14f9e Detect when the VirtualBox installation is incomplete and error 2012-03-30 19:29:39 -07:00
Mitchell Hashimoto 9f6bc9ee03 Catch Errno::ETIMEDOUT for downloading boxes [GH-849] 2012-03-30 19:28:10 -07:00
Mitchell Hashimoto 2ed6695f78 Improve the SSH ready? check [GH-841] 2012-03-28 22:30:01 -07:00
Mitchell Hashimoto c9d1110b0e Up version for development 2012-03-28 22:08:55 -07:00
Mitchell Hashimoto 41445466ee v1.0.2 2012-03-25 10:08:22 -07:00
Mitchell Hashimoto bfe20a223f Fail fast if the VM fails to boot properly. [GH-825] 2012-03-25 10:00:27 -07:00
Mitchell Hashimoto 1b4388ee98 Fix a few edge cases where CLI#execute didn't properly return an int 2012-03-25 09:58:57 -07:00
Mitchell Hashimoto 351f9757a1 Backwards compatible with_target_vms, fix failing test 2012-03-23 11:29:10 -04:00
withnale ff36845259 Allow multiple VMs to be specified for relevant commands 2012-03-23 11:25:35 -04:00
Mitchell Hashimoto 3338b6c134 Support arbitrary exit statuses for CLI commands that aren't exploding 2012-03-23 11:07:35 -04:00
Mitchell Hashimoto c1445a0130 Check if a port is open prior to forwarding [GH-821] 2012-03-23 10:31:27 -04:00
Mitchell Hashimoto d08a65e7f7 IsPortOpen utility 2012-03-23 10:26:29 -04:00
Mitchell Hashimoto 3877b71983 Better logging in the SaneDefaults middleware 2012-03-23 10:00:26 -04:00
Seth Chisamore c137dec14f Enable DNS proxy (in NAT mode) by default 2012-03-23 09:37:04 -04:00
Mitchell Hashimoto a1b16fd96d Merge pull request #816 from Oakie3CR/chef-solo-encrypted-databags
Add encrypted data bag options to chef-solo
2012-03-23 06:21:36 -07:00
Mitchell Hashimoto 1749e4cf94 Enable Host IO cache on SATA controller by default 2012-03-22 13:41:48 -07:00
Mitchell Hashimoto 641a8daac8 safe_puts to avoid EPIPE [GH-819] 2012-03-18 17:45:49 -06:00
Hendrik Volkmer 28e391cb61 Disable IdentitiesOnly for SunSSH
SunSSH is default on Solaris/OpenSolaris/Illumos. SunSSH does not support
the IdentitiesOnly option. 'vagrant ssh' works when the options is not supplied.
2012-03-18 16:32:15 +01:00
Mitchell Hashimoto cd92d6483f Update CHANGELOG 2012-03-15 09:52:28 -06:00
Remco Vermeulen 728dbe5a4f Make sure that the private_key_path is expanded before checking existence.
This allows for paths like ~/.ssh/some_key to be defined in the Vagrantfile.
2012-03-14 12:02:31 +01:00
Christian Rigdon b4e24c91f5 Add encrypted databag options to chef-solo 2012-03-13 16:27:11 -06:00
Benedikt Böhm aa06f06d1a add change_host_name support for gentoo 2012-03-13 14:56:22 -07:00
Benedikt Böhm 275241caf6 fix interpolation error in VMGuestError strings 2012-03-13 14:56:11 -07:00
Mitchell Hashimoto 3ff4be3632 Nicer error for unsupported SSH key type [GH-805] 2012-03-13 14:27:16 -07:00
Mitchell Hashimoto 0245245daa Update CHANGELOG 2012-03-13 14:19:34 -07:00
R. Tyler Croy 95ebd5b4ca Allow provisioners to prepare, even if they're not enabled
Fixes #801
2012-03-13 05:08:33 -07:00
Mitchell Hashimoto 5bc27e46d3 v1.0.1 2012-03-11 16:10:30 -07:00
Mitchell Hashimoto 07fa6d5dc4 ssh-config -h shows help [GH-793] 2012-03-11 10:38:23 -07:00
Mitchell Hashimoto b38083fb9b OpenBSD guest [GH-773] 2012-03-10 14:03:09 -08:00
Mitchell Hashimoto 8ea5e15b48 `vagrant reload` accepts `--no-provision` and `--provision-with` 2012-03-10 13:57:18 -08:00
Mitchell Hashimoto 37b8a13179 Add the :facter option for puppet server [GH-790] 2012-03-09 12:16:27 -08:00
Mitchell Hashimoto 0b28910b77 Update CHANGELOG + Style 2012-03-09 10:18:40 -08:00
Daniel Simmons 38212969c6 Don't attempt to calculate percentage if total is not set
Prevents a FloatDomainError if the total is zero or not known. Fixes #788.
2012-03-09 11:10:30 +00:00
Mitchell Hashimoto f8fa859b5f Raise an error if the CWD is incorrect 2012-03-08 16:57:17 -08:00
Mitchell Hashimoto 6969f791ad VAGRANT_CWD can be set to set the CWD of `vagrant`. 2012-03-08 16:45:19 -08:00
Mitchell Hashimoto ce00a56ecb Even with a custom vagrantfile name, use defaults [GH-778] 2012-03-08 13:24:04 -08:00
Mitchell Hashimoto bab5d7b685 Silent UI can't respond to `ask` 2012-03-07 22:42:47 -08:00
Mitchell Hashimoto 3046845215 Show nice error if vagrant destroy can't confirm [GH-779] 2012-03-07 22:35:40 -08:00
Mitchell Hashimoto 95b3e9f82f UI errors if a TTY is required and not given 2012-03-07 22:32:44 -08:00
Mitchell Hashimoto 700938b668 Load rubygems in environment.rb [GH-781] 2012-03-07 22:15:45 -08:00
Mitchell Hashimoto ef90fb7b0d Up version for dev 2012-03-06 11:38:11 -08:00
Mitchell Hashimoto 1fd4cb1a4e Fix a potential exception case by making UUID for VB driver optional 2012-03-06 11:37:36 -08:00
Mitchell Hashimoto 14513a99b3 Ignore me. 2012-03-05 22:17:39 -08:00
Mitchell Hashimoto 40901dc2e6 Make sure a driver is always set on a VM object 2012-03-05 20:42:55 -08:00
Mitchell Hashimoto 97cf6ddfba Update CHANGELOG 2012-03-04 16:39:35 -08:00
Wayne E. Seguin 9990311f20 Added Fedora 16 handling. 2012-03-04 18:42:37 -05:00
Mitchell Hashimoto a90f33dcf2 Avoid deadlock behavior on Windows subprocess IO [GH-765] 2012-02-28 09:44:28 -08:00
Achim Herwig 7c1fcbdde0 Added openSuSE as host system.
Init script for NFS-server differs.
2012-02-28 11:55:39 +01:00
Mitchell Hashimoto a8293543e9 Automatically convert all customize arguments to strings. 2012-02-26 14:13:24 -08:00
Mitchell Hashimoto 07a815f9d8 Remove deprecation warnings, the things are gone! 2012-02-25 12:35:58 -08:00
Mitchell Hashimoto 7b9f64f577 Allow data store to work even if file path is nil 2012-02-25 10:41:06 -08:00
Mitchell Hashimoto 6490710d43 Puppet accepts :facter option to override default facts [GH-753] 2012-02-25 10:18:17 -08:00
Mitchell Hashimoto 2c823e98bd Fix crashing bug with `primary_vm` on Environment 2012-02-24 10:27:34 -08:00
Mitchell Hashimoto 50fb129f53 Make VM#run_action public for plugin devs 2012-02-23 23:01:43 -08:00
Ian Downes 0f63171a4d Support for bridged networks in FreeBSD 2012-02-23 18:06:40 -08:00
Mitchell Hashimoto 23fe4ef7e2 Fix up the freebsd guest regex 2012-02-22 15:19:45 -08:00
Ian Downes 3ebde12efb add change_host_name support for FreeBSD 2012-02-22 15:08:18 -08:00
Mitchell Hashimoto 2f420705da Output version at the top of every log 2012-02-22 10:00:19 -08:00
Mitchell Hashimoto cf840c88b0 Merge pull request #751 from jjhuff/chef-provision
Fix for permissions when re-provisioning chef.
2012-02-20 17:28:31 -08:00
Mitchell Hashimoto 3e5b3d051b Fix exception when adding boxes due to recent change. [GH-752] 2012-02-20 17:26:22 -08:00
Justin Huff 32f7f98ef4 Fix for permissions when re-provisioning chef.
https://github.com/mitchellh/vagrant/issues/748
2012-02-20 09:53:09 -08:00
Jaime Soriano Pastor c0338dfa4b NIC type can also be defined for host-only adapters 2012-02-20 12:16:10 +01:00
Mitchell Hashimoto 5eb09aac3f Up version for RC2 2012-02-19 11:50:54 -08:00
Mitchell Hashimoto 8969605fe2 Check that VirtualBox exists early. [GH-746] 2012-02-19 11:36:25 -08:00
Mitchell Hashimoto c2fbbe7dee Better logging for config loading 2012-02-15 18:23:05 -08:00
Mitchell Hashimoto d4a2e39c3e Gracefully handle if the type of arg is not correct for bridged.
[GH-743]
2012-02-15 18:20:44 -08:00
Mitchell Hashimoto 163da82170 Fix edge case which caused exception in network configuration code.
[GH-742]
2012-02-15 11:11:11 -08:00
Mitchell Hashimoto 034477b52a Add `fsid` to linux exports for NFS. [GH-736] 2012-02-14 23:08:32 -08:00
Mitchell Hashimoto 96a920e4e5 Destroy VMs in reverse order. [GH-739] 2012-02-14 10:42:30 -08:00
Mitchell Hashimoto 2cf146cf6b Set uuid directly if VM couldn't be found. [GH-725]
This fixes a rare edge case where an exception could actually cause
Vagrant to remove the UUID state of a running VM, "losing" it.
2012-02-13 17:39:18 -08:00
Mitchell Hashimoto 888907de91 Up version for 1.0.0.rc1 2012-02-12 11:21:00 -08:00
Mitchell Hashimoto b64ac0b0d3 Use `binmode` to actually fix GH-727 2012-02-11 10:36:27 -08:00
Mitchell Hashimoto 9e427562ef Retry VirtualBox commands. [GH-726] 2012-02-10 21:56:59 -08:00
Mitchell Hashimoto c50c7959f9 Convert lineendings for the other guests as well 2012-02-10 18:14:51 -08:00
Mitchell Hashimoto ba42fffed0 Convert line endings to Unix-style [GH-727] 2012-02-10 18:07:59 -08:00
Mitchell Hashimoto 5c49d693d4 You can no longer output a package to a directory [GH-730] 2012-02-10 17:57:40 -08:00