Commit Graph

32 Commits

Author SHA1 Message Date
Mitchell Hashimoto 28720b181d guests/ubuntu: remove mount_nfs cap 2013-12-30 08:12:10 -08: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 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
elliotsegler 803e78a5d4 fixing error in comment #2333 2013-11-23 10:18:59 +08:00
elliotsegler a80de51054 Fixes recommended by phinze for #2333 2013-11-22 11:55:17 +08: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
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
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 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
Franz Pletz 65f275a5a8 DHCP renewal on Debian/Ubuntu after setting hostname
On Debian and Ubuntu guests, when the new hostname of the guest box is
set, the DHCP client (isc-dhcp-client) won't renew its DHCP lease with
the new hostname. Executing "ifdown -a; ifup -a" to reinitialize all auto
interfaces fixes this issue.

Furthermore, as vagrant will now actually wait until a DHCP lease is
acquired, it is guaranteed that the the correct domainname is set from
DHCP before calling other provisioners like puppet, that rely on it.
This fixes puppet/facter sometimes failing to find the fqdn fact on an
LXC guest when the DHCP server is responding too slow.
2013-07-15 12:54:52 +02:00
Tore Darell b111cb6392 Emit 'vagrant-mounted' on Ubuntu in mount_virtualbox_shared_folder capability
Also includes the same, but commented out, for mount_nfs capability
2013-05-11 16:11:57 +02:00
Fabio Rehm 4625d77072 More reliable Ubuntu and Debian guest detection
When dealing with lxc containers, '/proc/version' will have information
about the host machine kernel that can possibly have information about
an Ubuntu / Debian host, messing up with guest container detection.
2013-05-01 21:00:39 -03:00
Mitchell Hashimoto 0fbe9b0aca Ubuntu change_host_name cap 2013-04-03 23:53:17 -07:00
Mitchell Hashimoto 52f3847b0a Laying the foundation for the new guest plugin 2013-04-03 21:47:57 -07:00
Mitchell Hashimoto bb97351060 Change "channel" to "communicate" in all guests 2013-01-30 10:54:53 -08:00
Mitchell Hashimoto 1d2beff649 Guests to V2 2012-11-06 21:14:45 -08:00
Mitchell Hashimoto 335d9fad1f Merge pull request #1191 from lorello/master
Fix change_host_name on Ubuntu Hardy
2012-11-02 21:32:59 -07:00
Mitchell Hashimoto 625741ab6a Allow hostnames to be subset of box name for Ubuntu 2012-10-12 20:06:54 -07:00
LoreLLo fc0a0d04e5 fix change_host_name for Ubuntu Hardy 2012-10-12 18:11:52 +02:00
Hugo Wetterberg 17a6b64309 Emitting vagrant-mount events when mounting nfs volumes 2012-09-13 09:14:40 +02:00
Mitchell Hashimoto 1efee6edcb Use the new communication interface for Ubuntu guest 2012-08-20 12:15:42 -07:00
Bob Maerten 3dda019cac change_host_name should change mailname too
On Debian systems config.hostname directive should change /etc/mailname
in order to prevent problems with default mailer trying to contact
default vm's name.
2012-07-13 15:07:56 +02:00
Mitchell Hashimoto 459d82689e Get rid of autoload use in Guests
I don't use `activated` here because I'd really like to optimize
performance as much as possible, and loading files from disk is
generally slow. So instead of using `activated` I load the file at the
last possible moment which is when the exact class is being requested.

I don't think many people will do this outside of the core, and I'm not
too concerned.
2012-05-23 15:57:43 -07:00
Mitchell Hashimoto 9956e6d012 Better directory structure for plugins 2012-04-20 16:53:01 -07:00