Commit Graph

231 Commits

Author SHA1 Message Date
Myles A. K. Steinhauser e5445442c1 More specific Solaris <11 detection.
Note: This will probably break on Solaris 12+, but not certain of a better approach for now.
2014-01-14 09:52:27 -05:00
Stoned Elipot 10169f8e99 Add NetBSD guest support 2014-01-14 07:25:35 +01:00
Mitchell Hashimoto 2e3fcf576c synced_folders/rsync: allow guests to execute things before 2014-01-10 17:51:44 -08:00
Mitchell Hashimoto 91380c0650 synced_folders/nfs: automatically install NFS client if possible
If guests have the following capabilities, automatic NFS client
installation will be done:

  * nfs_client_installed - Checks if the NFS client is installed
  * nfs_client_install - Install the NFS client

Support is already in for Debian, Ubuntu, RedHat, CentOS, and Fedora
2014-01-09 16:58:20 -08:00
Mitchell Hashimoto 5e835f4201 Merge pull request #2792 from smoyer/redhat_hostname_patch
guests/redhat: use FQDN for hostname
2014-01-08 20:58:59 -08:00
Mitchell Hashimoto 732a03c1c4 guests/linux: properly quote and insert public key 2014-01-08 15:12:26 -08:00
smoyer 3964298504 This was introduced in 1.4.1 with d26c147.
This PR sets the active hostname back to the name specified in the Vagrantfile (fqdn) and updates the unit tests.

Setting it to the short name causes loads of problems while configuring the system. I've had issues with sudoers hostname matching, Weblogic certificate generation and a few others. Even if I changed all of the Chef recipes, the fqdn is set in /etc/sysconfig/network so the active hostname will switch to the fqdn after a reboot.
2014-01-08 17:49:54 -05:00
Mitchell Hashimoto b3a9e6a088 insert_public_key cap, and use that if it exists 2014-01-03 11:13:21 -08:00
Ryan S. Brown 23ce05d166 detect fedora 19 and 20 2014-01-02 11:09:11 -06:00
Seginoviax 12176515da Add funtoo guest support. Based heavily on https://github.com/mitchellh/vagrant/pull/1840 2013-12-31 17:33:10 -08:00
Seginoviax a4c74ea87a Revert "Add funtoo guest support. Based heavily on https://github.com/mitchellh/vagrant/pull/1840"
This reverts commit 3559c08086.
2013-12-31 17:12:19 -08:00
Seginoviax 3559c08086 Add funtoo guest support. Based heavily on https://github.com/mitchellh/vagrant/pull/1840 2013-12-31 00:54:32 -08:00
Mitchell Hashimoto 28720b181d guests/ubuntu: remove mount_nfs cap 2013-12-30 08:12:10 -08:00
Teemu Matilainen 572cdeeda9 guests/linux: Emit upstart event on VirtualBox using the expanded path 2013-12-22 08:55:59 -03:00
Teemu Matilainen 2fab268ede guests/linux: Emit upstart event `vagrant-mounted` also on NFS mounts
Complements #2502, and fixes error on VMs without upstart (like #2596).
2013-12-22 08:46:24 -03:00
Mitchell Hashimoto 489506ff83 guests/linux: up the amount of retries for NFS mounts 2013-12-18 08:38:31 -08:00
Charlie Huggard d26c1471d7 Refactor ChangeHostName for EL.
Based off of the Debian pattern. Need to add tests.

Related to #2653 and #2592
2013-12-16 01:52:39 -06:00
Markus Kern c8a09b344b guests/redhat: Don't error if ifdown fails [GH-2614] 2013-12-10 20:04:36 +00:00
Mitchell Hashimoto 05b2e03586 guests/redhat: don't ifdown non-existent interfaces [GH-2614] 2013-12-10 09:04:20 -08:00
Mitchell Hashimoto ed4cfa913c Merge pull request #2620 from ShonM/master
guests/freebsd: Update FreeBSD configure_networks with less shell specifics
2013-12-10 08:53:34 -08:00
Paul Hinze abe0731d2e guests/{ubuntu,debian}: fix change_host_name for trailing dots [GH-2610]
When `/etc/hosts` contained a FQDN with a trailing dot, the `\b` in the
sed expression would not match, since dot is not considered to be a word
character.

Fix this by regexp-escaping the hostname search, and matching the end of
the line on optional space followed by additional characters.

Also add some tests that extract the regexp used by sed and verify that
it does what we want. These will hopefully serve us in the future if we
ever need to test additional edge cases.
2013-12-09 18:56:45 -06:00
Shon M 3e1471fb53 Update FreeBSD configure_networks with less shell specifics 2013-12-09 17:27:54 -07:00
Matt Alexander edeb5f0e9f Add the symlink back that disabled renaming of network interface names 2013-12-07 14:59:40 -06:00
Matt Alexander df67d2b44f Run "ip link set [eth1] down" before running "netctl start [eth1]" in Arch guest network configuration 2013-12-07 14:22:19 -06:00
Mitchell Hashimoto f3d71de022 Merge pull request #2591 from instilled/arch-netctl-fix
guests/arch: netctl fix
2013-12-06 15:02:41 -08:00
Teemu Matilainen c566465bdc Fix testing if initctl exists
If /sbin/initctl was not found, the command (`false && ...`) returned
non-zero exit code leading to Vagrant throwing an exception.
2013-12-06 18:17:41 -03:00
me 2a75c34d62 systemctl wasn't a good idea 2013-12-05 16:01:44 +01:00
me 158d82ea39 Avoid udev rule masking and configure ifaces with sed instead. 2013-12-05 15:16:59 +01:00
Mitchell Hashimoto d9dc2d6cfd guests/linux: --no-wait on emit [GH-2564] 2013-12-03 12:14:10 -08:00
Elan Ruusamäe 1df4f5a8ed require pld/cap/change_host_name 2013-11-27 09:38:28 +02:00
Elan Ruusamäe 2416149aa3 fix hostname change on pld 2013-11-27 09:35:18 +02:00
Mitchell Hashimoto fc190fad9f guests/redhat: DHCP_HOSTNAME set to hostname [GH-2441] 2013-11-26 11:28:47 -08:00
Mathieu Lecarme 09a86bd70a Sometimes, ifdown is not enough. 2013-11-26 13:40:50 +01:00
Mitchell Hashimoto 195f0d9639 guests/linux: emit upstart event for vagrant mounted if avail [GH-2502] 2013-11-25 11:31:15 -08:00
phinze 688bca14f5 refactoring ubuntu/debian change_host_name
there's been a lot of churn around this code, so i figure it was worth
trying to clean it up.

 - the methods were doing a lot, so make them into template methods with
   one helper per step
 - spread out /etc/hosts regexp into a couple of helper variables for
   clarity
 - remove handling for broken hostname implementations (like basing all
   of the checks on name.split('.')[0]), since it seems reasonable to
   remove code dedicated only to handling broken boxes
 - DRY up the shared code between debian/ubuntu implementations, which
   clarifies the differences as well
 - add unit tests around the behavior; this will help us in the future
   to separate flaws in our understanding from flaws in implementation
 - includes a new DummyCommunicator in tests which should be useful in
   supporting additional unit testing of this kind
 - manually tested this on squeeze, wheezy, precise, quantal, raring,
   and saucy successfully.

handles the issue in #2333
2013-11-24 11:46:12 -06:00
Mitchell Hashimoto 45702f9d44 Merge branch 'issue_2333' of https://github.com/elliotsegler/vagrant into elliotsegler-issue_2333
Conflicts:
	plugins/guests/ubuntu/cap/change_host_name.rb
2013-11-23 15:38:49 -08:00
Mitchell Hashimoto 23bdbd6fd8 synced_folders/nfs: specify nfs_udp false to disable udp [GH-2304] 2013-11-23 13:43:48 -08:00
Mitchell Hashimoto 88425f0146 Merge pull request #2390 from borgstrom/master
core: allow owner & group to be supplied as an Integer and skip lookup
2013-11-23 11:46:50 -08:00
Mitchell Hashimoto a4fe547536 Merge pull request #2444 from tmatilai/debian_hostname_fix
guests/debian: Fix hostname setting also in Debian, part N
2013-11-23 11:45:38 -08:00
Mitchell Hashimoto 5b71cf87f3 Merge pull request #2450 from onejli/master
guests/redhat: ifdown ethN before munging ifcfg-ethN
2013-11-23 11:40:02 -08:00
Mitchell Hashimoto dcf57bd2cc guests/linux: increase sleep time btween NFS mount retries 2013-11-23 11:35:27 -08:00
elliotsegler 803e78a5d4 fixing error in comment #2333 2013-11-23 10:18:59 +08:00
Mark Peek d5dcf84d62 Allow the FreeBSD plugin to install without bash [GH-2485]
The default shell is "bash -l" which does not get installed by default
on FreeBSD. This change allows the plugin to override the default shell
and use a known installed shell (sh).
2013-11-22 15:30:12 -08:00
elliotsegler a80de51054 Fixes recommended by phinze for #2333 2013-11-22 11:55:17 +08:00
Jonathan Li 1ad756d52c ifdown ethN before munging ifcfg-ethN (i.e. removing previous vagrant config for network interface) 2013-11-02 12:35:37 -07:00
Teemu Matilainen 2073a1a939 Fix hostname setting also in Debian, part N
Port #2384 / #2383 for Debian guests.
2013-10-31 21:39:45 -03:00
Heikichi Umehara c0eb9bd35a fix nfs mount fail with freebsd. 2013-10-21 08:42:57 +09:00
Evan Borgstrom 9c8ead1ca3 Restore correct pathing 2013-10-17 22:45:23 -04:00
Evan Borgstrom ebb85b57fd Allow owner & group to be supplied as an Integer and skip lookup 2013-10-17 22:40:21 -04:00
Nathan Mische 0c238741d3 Fixing so localhost hosts file entry is not lost when updating hostname. Addresses Issue #2383. 2013-10-17 12:56:59 -04:00
Teemu Matilainen 330f72eae2 Fix hostname setting also in Debian
Same fix as #2334.
2013-10-15 15:57:40 -03:00
Teemu Matilainen 535eb35206 Use old name instead of hard coded 'precise64' 2013-10-15 15:57:15 -03:00
Mitchell Hashimoto f988db97bd Merge pull request #2334 from elliotsegler/issue_2333
guests/ubuntu: Hostname and FQDN should be done in one line
2013-10-14 20:21:53 -07:00
Doug MacEachern 6c9edbbdc6 guests/esxi: Add support for VMware ESXi guests 2013-10-08 21:47:32 -07:00
Laurent Raufaste 157a7081ba Update boundary usage in the sed regexp to update the hosts file 2013-10-08 20:14:22 -04:00
Elliot Segler 06aaa6e6ea #2333, more fixes - right order to get fqdn right 2013-10-08 17:53:27 +08:00
Elliot Segler 1abcf1e54f Better fix for issue #2333, does localhost as well so we dont break local name resolution for things like puppet 2013-10-08 17:01:54 +08:00
Elliot Segler 9ca6fbe8f4 Hostname and FQDN should be done in one line 2013-10-06 15:33:00 +08:00
Mitchell Hashimoto d970c4e03f Merge pull request #2254 from Caustic/fix-hostname-debian
guests/debian,ubuntu: Fixed fqdn handling
2013-09-25 10:36:33 -07:00
François Charlier c1228ae206 Allow to change the DHCP_HOSTNAME on RedHat 2013-09-24 23:48:10 +02:00
Alan Braithwaite 7d53047a92 Fixed fqdn handling on debian/ubuntu
The issue was that the old method simply didn't work.  When the hosts
file should look like:
    127.0.1.1   host.fqdn.com host
It looked like:
    127.0.1.1   host.fqdn.com host old.fqdn.com old
Or this if the user didn't set a fqdn
    127.0.1.1   host host old.fqdn.com old

This patch fixes that.
2013-09-22 00:33:24 -07:00
Pete Michaud e65ac705b4 fixed missing backtick 2013-09-21 21:41:06 -05:00
Mitchell Hashimoto 4d03a7359e guests/linux: fail after a number of attempts 2013-09-20 17:52:36 -07:00
Mitchell Hashimoto 62e357ffcd guests/linux: only successful mount if exit status 0 2013-09-20 17:50:29 -07:00
Mitchell Hashimoto b9801f44a0 guests/linux: try `id -g` to determine group as well [GH-2197] 2013-09-16 20:51:09 -07:00
Mitchell Hashimoto 517ac20822 guests/coreos: proper guest IP detection [GH-2146] 2013-09-06 11:30:53 -07:00
Mitchell Hashimoto ab7cee1ae0 Merge pull request #2107 from fgrehm/remove-dead-code
core: Remove dead code from Guest
2013-09-01 13:47:18 -07:00
Mitchell Hashimoto 7897de3fbd guests/ubuntu: enable the new mount_nfs stuff 2013-09-01 13:46:09 -07:00
Mitchell Hashimoto 8bc01c7cb1 Merge pull request #1717 from toretore/master
guests/ubuntu: Emit Ubuntu Upstart 'vagrant-mounted' (regression)
2013-09-01 13:43:26 -07:00
Fabio Rehm 77dd626341 guest: Remove dead code 2013-09-01 17:41:17 -03:00
Mitchell Hashimoto e5b35d1c83 core: support "mount_options" for arbitrary mount options [GH-1029] 2013-09-01 12:25:21 -07:00
Mitchell Hashimoto 826c8a884d Merge pull request #1801 from davegudge/patch-1
core: use getent to get group ID
2013-08-28 17:02:46 -07:00
Mitchell Hashimoto 5a18be1827 Merge pull request #2052 from janth/solaris11-guest
guests/solaris11: Added solaris11 guest plugin
2013-08-28 16:38:54 -07:00
Tomoyuki Sahara 91db685295 more capabilities for OpenBSD guest 2013-08-28 13:12:09 +09:00
Jan Thomas Moldung 75c03726b9 Added solaris11 guest plugin 2013-08-14 16:10:18 +02:00
Boohbah 903578269b Use hostnamectl in plugins/guests/arch/cap/change_host_name.rb 2013-08-10 00:41:18 +00:00
Timothy Sutton caaaa9fe28 Support verify_vmware_hgfs in darwin guest. 2013-08-09 15:00:38 -04:00
Mitchell Hashimoto b2f32543d9 Merge pull request #1689 from philippfranke/master
guests/suse: Add ability to configure networks
2013-08-09 11:21:26 -07:00
Mitchell Hashimoto 8e065abf3c Merge pull request #2026 from ppp0/patch-set-hostname-debian
plugins/guests/debian: Forcing eth0 to come up
2013-08-09 11:11:57 -07:00
Mitchell Hashimoto d24caac5ae Merge pull request #1914 from b2jrock/darwin-guest
OS X (darwin) guest support.
2013-08-09 10:53:29 -07:00
Timothy Sutton 23962baac9 Darwin: use :sudo for communicate.test 2013-08-07 17:10:32 -04:00
Timothy Sutton a3b9428f67 Darwin: code debug cleanup 2013-08-06 10:18:38 -04:00
Timothy Sutton 8b925e6c15 Update Darwin guest description 2013-08-06 10:18:12 -04:00
Timothy Sutton 78ec8b5809 Darwin: clean up temporary network interface file downloaded from guest 2013-08-06 10:17:52 -04:00
Timothy Sutton 300d151608 Darwin guest: mount_vmware_shared_folder cap for use with vmware_fusion provider
- It's not clear whether it's possible to mount individual shares
  using 'mount -t vmhgfs', as the vagrant-vmware-fusion provider now does
  for Linux guests. Any mount from '.host', even if not a valid share
  name, succeeds and mounts _all_ shares in their respective directories
  at the root of the mountpoint. Instead, we symlink each directory from
  its place in '/Volumes/VMware Shared Folders'
2013-08-06 10:17:12 -04:00
Brian Johnson 7d0a92c5b4 Remove the +1 offset, I resolved the issue with the 'phantom' en1
interface. For some reason interfaces still skip en1, but provided we
enumerate based on order and not name, things should work smoothly.
2013-08-05 18:45:42 -07:00
Brian Johnson e5ce19ff11 Tabs must die. 2013-08-05 18:07:45 -07:00
Brian Johnson 3611ff39f4 Change mount_nfs_folder cap to be more like the linux version, adding a
bunch of retires rather than a long sleep.

Add DarwinNFSMountFailed error. This might move be more appropriate at
the plugin level.

Integrate some of tvsutton's work in configure_networks to get the
implementation closer to working in both fusion and virtualbox.

Add shell_expand_guest_path capability (also copied from linux)
2013-08-05 17:39:44 -07:00
Philipp Gysin b6f2443bd5 Forcing eth0 to come up 2013-08-05 18:02:12 +02:00
Artur Roszczyk bf21021cfc Cleanup of CoreOS guest plugin 2013-08-04 02:15:37 +02:00
Artur Roszczyk c8cd47ff6d Make slaves connecting to first node 2013-08-03 22:53:31 +02:00
Artur Roszczyk d8c10ad901 LVP for coreos guest support 2013-08-03 20:31:42 +02:00
Artur Roszczyk 5010738043 Improve Gentoo guest detection 2013-08-03 19:55:17 +02:00
Brian Johnson 5606aa8b1e Working implementation with NFS, still some caveats:
- There's a lengthy sleep in there, probably could use a back-off loop
- en1 seems totally worthless on vbox, I skip it and just use the en2 it creates.
2013-07-31 18:07:04 -07:00
Mitchell Hashimoto c0404e3f63 Mount NFS with UDP protocol by default [GH-1706] 2013-07-23 17:36:48 -05:00
Mitchell Hashimoto f4c36795df Properly determine shared folder path even if .profile echos [GH-1677] 2013-07-19 23:53:53 -04:00
Mitchell Hashimoto cbf1417964 Change solaris shut down command to properly shut down [Gh-1506] 2013-07-18 11:48:20 -04:00
Mitchell Hashimoto bc7b481dbe Get the deb/ubuntu change host name correct 2013-07-17 13:39:32 -05:00
Mitchell Hashimoto 9d6a6cc9a1 Allow hotplug on deb/ubuntu change host name [GH-1929] 2013-07-17 05:03:48 -07:00
Fabio Rehm 2d4a3994ea Merge pull request #1734 from frankshearar/arch-configure-network-needs-template
No TemplateRenderer for arch's configure_networks
2013-07-16 18:20:46 -07:00