Commit Graph

54 Commits

Author SHA1 Message Date
Paul Hinze 25ff636ee2 providers/virtualbox: cleanup default vbox dhcp server
fixes #3083

Detect the presence of the default DHCP server that comes in a fresh
VirtualBox install and clean it up to prevent it from colliding with
Vagrant-managed network config.

In order to accomplish this, we:

 - add a `remove_dhcp_server` call to the virtualbox driver
 - fix dhcp options parsing to allow `:dhcp_{ip,lower,upper}`
   configuration options to make it through (so a user can override the
   removal behavior with some explicit configuration)
 - add the full `:network_name` to the details returned from
   `:read_dhcp_servers`, so we can have a durable value to pass to
   `:remove_dhcp_server`

Note that we do have to eat one more `VBoxManage list dhcpservers` for
each network interface to support this, but this seemed like a nominal
cost
2014-11-30 22:03:52 -06:00
Paul Hinze 24b6f21d1d providers/virtualbox: extract reading dhcpservers from hostonlyifs
This is just a refactor, no behavior change.

Instead of stitching together dhcpserver info in the structure returned
from `read_host_only_interfaces`, sprout a new driver method called
`read_dhcp_servers` to return that information separately.

This means that driver clients (well there's really only _one_ client in
`ProviderVirtualBox::Action::Network`) have to do a bit more work to get
interface and DHCP server information.

But this gives us (a) a cleaner and more consistent driver interface and
(b) groundwork for a fix for #3083, which will require interacting with
DHCP servers outside of the context of host-only interfaces.
2014-11-30 22:03:52 -06:00
Paul Hinze 703c1f153b providers/virtualbox: fix flaky test when rsync is not installed
test-only change

when rsync is not installed on the machine running the unit tests, the
prepare_nfs_settings tests end up calling the :nfs_installed capability
on the host, which fails on the fake host wired up in tests.

this adds some explicit stubbing to prevent the implicit assumption that
rsync is installed.
2014-11-30 22:03:27 -06:00
Mitchell Hashimoto f122ed756c Merge pull request #4571 from jperville/docker-provider-allow-multiple-links-to-same-backend
providers/docker: allow multiple links to same backend (different aliases)
2014-10-23 09:45:14 -07:00
Mitchell Hashimoto 7287604450 Merge pull request #4671 from jramnani/fix/master/nfs_exports_file_for_freebsd_guests
Fix #4658. Bad NFS exports file on OS X & BSD hosts.
2014-10-23 09:12:00 -07:00
Mitchell Hashimoto 296d0639cc providers/docker: support auth [GH-4042] 2014-10-22 13:12:31 -07:00
Mitchell Hashimoto 7988f0fb7c Fix broken unit tests 2014-10-22 09:44:48 -07:00
Mitchell Hashimoto 82f806f438 Fix unit tests 2014-10-22 08:39:59 -07:00
Mitchell Hashimoto 9d4ab18f42 providers/docker: stop_timeout [GH-4504] 2014-10-21 17:50:45 -07:00
Jeff Ramnani bd5fd7ab18 Fix #4658. Bad NFS exports file on OS X & BSD hosts.
For FreeBSD guests, Virtualbox can sometimes report the private network
interface IP address as "0.0.0.0".  This will cause an invalid NFS
exports file to be generated for FreeBSD and OS X hosts.

Fixed by not allowing Virtualbox to report a guest IP address of
"0.0.0.0".
2014-10-20 12:35:30 -05:00
Julien Pervillé 97341c3234 providers/docker: allow multiple links to same backend (different aliases). 2014-09-29 18:46:01 +02:00
Leo Simons fec14cf04c Use -f argument to rm to force-remove files.
When using pty=true, removing files using sudo may request confirmation,
which will hang the connection.

Similarly, sometimes assumptions about file existence may be wrong and
in those cases it seems better to continue on as long as the file does
not exist, so -f makes sense there, too.
2014-08-29 10:51:31 +02:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto 745bdf6766 providers/docker: ability to specify build dir synced folder opts [GH-3727] 2014-05-08 18:46:03 -07:00
Gosha Arinich 7558524482 docker container links is actually a hash, fix tests 2014-05-08 21:27:58 +03:00
Fabio Rehm 7538d07233 providers/docker: Ensure long flags are used 2014-05-07 12:12:16 -03:00
Fabio Rehm 3ab5064e02 providers/docker: Add required configs and specs (build is green now) 2014-05-07 12:12:16 -03:00
Fabio Rehm 89db0f64e5 providers/docker: Rename test files for consistency 2014-05-07 11:19:36 -03:00
Mitchell Hashimoto d7a9bcda47 providers/docker: vagrant_machine setting works proprely 2014-05-05 21:13:15 -07:00
Mitchell Hashimoto c818a14072 providers/docker: expose ports 2014-04-27 18:37:25 -07:00
Mitchell Hashimoto 4372ab034e providers/virtualbox: merge customizations properly 2014-04-21 13:56:32 -07:00
Mitchell Hashimoto 8171471628 providers/docker: make merge logic a bit more sensible 2014-04-21 13:56:13 -07:00
Mitchell Hashimoto 8a76c2bc76 providers/docker: can force a host VM optionally 2014-04-21 13:56:08 -07:00
Mitchell Hashimoto 79793ab130 providers/docker: config validation and specs 2014-04-21 13:56:07 -07:00
Mitchell Hashimoto 81df70eee0 providers/docker: support building Dockerfiles 2014-04-21 13:55:54 -07:00
Mitchell Hashimoto 61388186e9 providers/docker: can set custom container name 2014-04-21 13:55:51 -07:00
Mitchell Hashimoto 58ddc66b9c providers/docker: can specify links 2014-04-21 13:55:50 -07:00
Mitchell Hashimoto 71d615212d providers/docker: can set environmental variables 2014-04-21 13:55:49 -07:00
Mitchell Hashimoto 8c7ab333a0 Squash the f-docker-hostmachine branch.
Initial work

commands/up: make sure all names to with_target_vms are strings

providers/docker: create a docker host VM if needed

providers/docker: executor abstraction for driver to eventually support remote

providers/docker: vagrant executor

providers/docker: support creating the machine

providers/docker: status works if host VM is gone

providers/docker: use start fence to get real docker output

core: Call preserves stack ordering

core: support Message post option

providers/docker: Guard some features with HasSSH checks

providers/docker: much better messaging around create/destroy

providers/docker: output the container ID on create

providers/docker: copy the hostmachine Vagrantfile to the data dir

providers/docker: should make host machine before any up action

providers/docker: HandleBox before the host machine

providers/virtualbox: functional_vboxsf to disable vboxsf

providers/virtualbox: synced folder usable method should take 2 args

providers/docker: default machine name to :default
2014-04-21 13:54:33 -07:00
Mitchell Hashimoto ba1676b232 providers/hyperv: fix tests and bug with usable? 2014-04-21 13:53:36 -07:00
Mitchell Hashimoto ab2cae2379 providers/docker: synced folder usable? raises error, tests
/cc @fgrehm
2014-04-21 13:53:05 -07:00
Mitchell Hashimoto 2e13feb130 providers/docker: Clean up config and make a spec 2014-04-21 13:53:04 -07:00
Fabio Rehm e5375715ef providers/docker: Update driver to docker 0.9 2014-04-21 13:51:45 -07:00
Fabio Rehm 5a60e568ce providers/docker: Import code from https://github.com/fgrehm/docker-provider with some initial tweaks 2014-04-21 13:51:31 -07:00
Fabio Rehm 99547eef8f For some weird reason the changes introduced by transpec made this spec fail, this should fix it 2014-03-14 12:09:07 -03:00
Fabio Rehm 54656151cf Convert specs to RSpec 2.14.8 syntax with Transpec
This conversion is done by Transpec 1.10.2 with the following command:
    transpec test/unit/

* 507 conversions
    from: obj.should
      to: expect(obj).to

* 394 conversions
    from: == expected
      to: eq(expected)

* 260 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 85 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 25 conversions
    from: its(:attr) { }
      to: describe '#attr' do subject { super().attr }; it { } end

* 19 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 7 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

* 3 conversions
    from: Klass.any_instance.should_receive(:message)
      to: expect_any_instance_of(Klass).to receive(:message)
2014-03-14 12:02:07 -03:00
Mitchell Hashimoto 4104f6c21f Fix Hyper-V tests 2014-03-06 09:04:23 -08:00
Mitchell Hashimoto 5d19285774 providers/hyperv: wait for IP on boot 2014-02-27 08:12:57 -08:00
Mitchell Hashimoto 7c0948c81d providers/hyperv: clean up status script 2014-02-27 08:12:55 -08:00
Mitchell Hashimoto fe93b0d2a5 providers/hyperv: more checks on machine import 2014-02-27 08:12:53 -08:00
Mitchell Hashimoto 784a5b2e32 providers/hyperv: all sorts of tests to verify Windows/admins 2014-02-27 08:12:51 -08:00
Mitchell Hashimoto a1958ee12f providers/hyperv: shuffle things around 2014-02-27 08:12:48 -08:00
Mitchell Hashimoto b1bed68bed providers/virtualbox: cap to read forwarded ports 2014-02-13 16:34:34 -08:00
Mitchell Hashimoto 8d3afa73d2 providers/virtualbox: config to skip guest additions check 2014-02-08 18:35:09 -08:00
Mitchell Hashimoto 8e9ceeaf5c core: Machine has reference to Vagrantfile 2014-02-07 09:16:55 -08:00
Mitchell Hashimoto cdf1d7f318 core: get rid of all uses of config_global 2014-02-06 20:22:15 -08:00
Mitchell Hashimoto dd33a26422 providers/virtualbox: network config uses proper format, tests [GH-2854] 2014-01-17 09:53:02 -08:00
Mitchell Hashimoto 35a19f829c provider/virtualbox: fix NFS tests on Windows 2014-01-15 11:48:07 -08:00
Mitchell Hashimoto 5e490e3746 Get tests to pass 2014-01-07 19:26:03 -08:00
Paul Hinze fc66ec1660 providers/virtualbox: allow and prefer static guest IPs for NFS
Since vbox guest properties are proving to be less reliable than we had
hoped, bring back the static config parsing mechanism for finding a
guest IP to hand to NFS. If we find a static IP (or set of IPs) we'll
use that instead of trying to probe guest properties.

This retains NFS support for DHCP interfaces while regaining the
reliability that we previously had when static IPs were required.
2013-12-28 17:01:08 -06:00