Code Monkey home page Code Monkey logo

landrush's Introduction

Landrush: DNS for Vagrant

Build Status Build Status Gem Version

Landrush is a simple cross-platform DNS for Vagrant VMs that is visible on both, the guest and the host.

It spins up a small DNS server and redirects DNS traffic from your VMs to use it, automatically registering/unregistering IP addresses of guests as they come up and go down.

Note

This project is currently unmaintained and looking for maintainers! Anybody interested in helping out please contact @hferentschik.

I’d be happy to help coach anybody who wants to drop in and pick up the maintainer role for this plugin!



Installation

Install under Vagrant (1.1 or later):

$ vagrant plugin install landrush

Getting started

  1. Enable the plugin in your Vagrantfile:

    config.landrush.enabled = true
  2. Bring up a machine.

    $ vagrant up
  3. You are able to get your VM’s hostname resolved on your host:

    $ dig -p 10053 @localhost myhost.vagrant.test
  4. If you shut down your guest, the entries associated with it will be removed.

Landrush retrieves your VM’s hostname from either the vagrant config or it uses the system’s actual hostname by running the hostname command. A default hostname of "guest-vm" is assumed if the hostname is otherwise not available.

A Landrush example configuration could look like this:

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"

  config.landrush.enabled = true

  config.vm.hostname = "myhost.vagrant.test"

  config.landrush.host 'static1.example.com', '1.2.3.4'
  config.landrush.host 'static2.example.com', '2.3.4.5'
end

See the Usage guide for further information.

Available CLI commands

Check out vagrant landrush help for the available commands.

vagrant landrush <command>

commands:
  {start|stop|restart|status}
    control the landrush server daemon
  list, ls
    list all DNS entries known to landrush
  dependentvms, vms
    list vms currently dependent on the landrush server
  set { <host> <ip> | <alias> <host> }
    adds the given host-to-ip or alias-to-hostname mapping.
    Existing host ip addresses will be overwritten
  rm, del { <host> | <alias> | --all }
    delete the given hostname or alias from the server.
     --all removes all entries
  help
    you're lookin at it!

Troubleshooting

See the Troubleshooting guide to resolve issues you face while using Landrush.

Help Out!

This project needs your feedback and help! Please do not hesitate to open issues or submit pull requests. We welcome your input. If you wish to contribute to the development of Landrush, refer to the Contributing guide for details on how you can contribute. The Development guide will help you setup your development environment.

landrush's People

Contributors

amfranz avatar aromanovich avatar bexelbie avatar boogles avatar coolbrg avatar davividal avatar dennisdegreef avatar electrofelix avatar ezekg avatar fh avatar glaubinix avatar greend139 avatar greglearns avatar gurpartap avatar hferentschik avatar jmontleon avatar legal90 avatar marcindulak avatar metcalfc avatar njam avatar phinze avatar preeticp avatar rjocoleman avatar sebastien-fauvel avatar spieszko avatar strzibny avatar tinco avatar tomcbe avatar vincer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

landrush's Issues

iptables rules lost on machine reboot

so if you reboot your machine without doing halt / up, your DNS will revert to non-landrush mode.

obviously the workaround is to do the halt / up cycle, but that's not very swag. :bowtie:

Support for non debian/redhat OS

It would be nice to support other OSes by either adding more capability checks, or by adding an override option which disables checking for iptables. I use CoreOS which has no package manager, but still has iptables, but I can't use landrush since it cannot detect iptables.

Can't ping guest from host in OSX

with configuration

config.landrush.enable
config.vm.box = "oracleLinux64"
config.vm.box_url = "http://kickstart.boston.zipcar.com/oracle_install/oracle.box"
config.vm.hostname = "oracle.vagrant.dev"
config.landrush.host 'static1.example.com', '1.2.3.4'

dig responds by correctly identifying the ip for oracle.vagrant.dev and static1.example.com

however ping, nslookup, and host are all unable to recognize the hostname
further, resolv.conf does not reflect localhost as a used DNS

wat do?

unable to install on vagrant 1.6.3

complains about eventmachine while running

vagrant plug install landrush

Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing eventmachine (1.0.3), and Bundler cannot continue.
Make sure that gem install eventmachine -v '1.0.3' succeeds before bundling.

eventmachine gem installs manually without issues.

automatically start/stop the server in the background?

it would be nice if we could automate away the requirement that one manages the rubydns server manually.

it seems like you should be able to do very simple refcounting of vagrant boxen and determine whether you need to boot or shutdown the server.

we'd need to daemonize the server too.

read_host_visible_ip_address doesn't work for distros where ifconfig is not in the $PATH

Ubuntu and CentOS work fine, but in Debian this isn't working since the vagrant user's path does not include /sbin.
( see landrush/lib/landrush/cap/linux/read_host_visible_ip_address.rb )

In Debian 6 and 7:

vagrant@debian:~$ echo $PATH; echo; which ifconfig; echo; cat /etc/os-release
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games


PRETTY_NAME="Debian GNU/Linux 7.0 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7.0"
VERSION="7.0 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"

In Ubuntu 12.04, a user's default path is this:

vagrant@ubuntu:~$ echo $PATH; echo; which ifconfig; echo; cat /etc/os-release
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

/sbin/ifconfig

NAME="Ubuntu"
VERSION="12.04.4 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.4 LTS)"
VERSION_ID="12.04

this also is working in CentOS just fine, due to the default PATH:

[vagrant@test ~]$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/vagrant/bin

For now, I'm baking this into my debian images (with a veewee tweak) as a quick-fix:
sudo ln -s /sbin/ifconfig /usr/bin/ifconfig

When this fix isn't there, the entries come in as nil:

[debian] [landrush] adding machine entry: test.vagrant.dev => 

...

vagrant landrush list
test.vagrant.dev
myhost.example.com          1.2.3.4

...

# no response from dig
; <<>> DiG 9.8.3-P1 <<>> -p 10053 @localhost test.vagrant.dev
; (3 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 48432
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;test.vagrant.dev.      IN  A

...

# from the logs:
E, [2014-03-24T13:52:25.832892 #20624] ERROR -- : Exception thrown while processing test.vagrant.dev Resolv::DNS::Resource::IN::A!
E, [2014-03-24T13:52:25.833065 #20624] ERROR -- : ArgumentError: cannot interpret as IPv4 address: nil

Would it be acceptable to just change the usage of 'ifconfig' to use '/sbin/ifconfig', or are there certain distros/circumstances where we wouldn't want to use the one from /sbin/ ?

Possible bug: RuntimeError no datagram socket

I have recently come across the following issue when using landrush 0.12.0. With a virtualbox provider, set up a ubuntu precise64 guest with the following network settings (and landrush enabled):

config.vm.define "provisioner" do |server1|
    server1.vm.hostname="provisioner.vagrant.dev"
    server1.vm.provision :shell, :path => "provision.sh"
    server1.vm.network "private_network", ip: "10.11.1.106"
end

The guest fails to resolve hostnames and is consequently unable to do an apt-get update, etc.

The Landrush-Server.log indicates that something has crashed due to not being able to get a socket. I have added the log file below.

Everything seems to have worked fine a couple of days ago and I am not aware of anything that has changed since then...

=== Log Marked @ 2014-04-02 15:17:16 +0300 ===
I, [2014-04-02T15:17:16.966251 #44583]  INFO -- : Starting RubyDNS server (v0.7.0)...
I, [2014-04-02T15:17:16.966830 #44583]  INFO -- : Listening on udp:0.0.0.0:10053
=== Daemon Exception Backtrace @ 2014-04-02 15:17:16 +0300 ===
RuntimeError: no datagram socket
/Users/brunow/.vagrant.d/gems/gems/eventmachine-1.0.3/lib/eventmachine.rb:859:in `open_udp_socket'
/Users/brunow/.vagrant.d/gems/gems/eventmachine-1.0.3/lib/eventmachine.rb:859:in `open_datagram_socket'
/Users/brunow/.vagrant.d/gems/gems/rubydns-0.7.0/lib/rubydns/server.rb:122:in `block in run'
/Users/brunow/.vagrant.d/gems/gems/rubydns-0.7.0/lib/rubydns/server.rb:119:in `each'
/Users/brunow/.vagrant.d/gems/gems/rubydns-0.7.0/lib/rubydns/server.rb:119:in `run'
/Users/brunow/.vagrant.d/gems/gems/rubydns-0.7.0/lib/rubydns.rb:42:in `block in run_server'
/Users/brunow/.vagrant.d/gems/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
/Users/brunow/.vagrant.d/gems/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
/Users/brunow/.vagrant.d/gems/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
/Users/brunow/.vagrant.d/gems/gems/rubydns-0.7.0/lib/rubydns.rb:41:in `run_server'
/Users/brunow/.vagrant.d/gems/gems/landrush-0.12.0/lib/landrush/server.rb:51:in `run'
/Users/brunow/.vagrant.d/gems/gems/rexec-1.6.3/lib/rexec/daemon/controller.rb:92:in `block in start'
/Users/brunow/.vagrant.d/gems/gems/rexec-1.6.3/lib/rexec/daemon/controller.rb:75:in `fork'
/Users/brunow/.vagrant.d/gems/gems/rexec-1.6.3/lib/rexec/daemon/controller.rb:75:in `start'
/Users/brunow/.vagrant.d/gems/gems/rexec-1.6.3/lib/rexec/daemon/base.rb:129:in `start'
/Users/brunow/.vagrant.d/gems/gems/landrush-0.12.0/lib/landrush/action/setup.rb:49:in `start_server'
/Users/brunow/.vagrant.d/gems/gems/landrush-0.12.0/lib/landrush/action/setup.rb:23:in `pre_boot_setup'
/Users/brunow/.vagrant.d/gems/gems/landrush-0.12.0/lib/landrush/action/setup.rb:8:in `block in call'
/Users/brunow/.vagrant.d/gems/gems/landrush-0.12.0/lib/landrush/action/common.rb:22:in `handle_action_stack'
/Users/brunow/.vagrant.d/gems/gems/landrush-0.12.0/lib/landrush/action/setup.rb:7:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/clear_network_interfaces.rb:26:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:15:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/synced_folders.rb:68:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/env_set.rb:19:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/provision.rb:52:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/set_name.rb:48:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:57:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:57:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:147:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
=== Daemon Crashed ===
=== Daemon Stopping @ 2014-04-02 15:17:16 +0300 ===

Bad argument `53' error on starting VM (centos 5.8)

I get an error Bad Argument error

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

iptables -C OUTPUT -t nat -p tcp -d  --dport 53 -j DNAT --to-destination 10.0.2.2:10053 2> /dev/null || iptables -A OUTPUT -t nat -p tcp -d  --dport 53 -j DNAT --to-destination 10.0.2.2:10053

Stdout from the command:

Bad argument `53'

Stderr from the command:

Try `iptables -h' or 'iptables --help' for more information.

I'm using vagrant 1.6.3 and a centos 5.8 box. Any suggestions?

Regards,

Bert

Ping host from guest

Team,

I'm having some problems communicating between host and guest and vice versa. Here is my non-landrush Vagrantfile:

Vagrant.configure("2") do |config|
config.vm.box       = "centos64"
config.vm.box_url   = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box"
config.vm.hostname = "agent"
end

When the machine comes up I can "vagrant ssh" into the machine. And I can ping my host by name (in this case "indy.local" is the host, and "ping indy.local" works).

At this point though the host can't ping the guest. Enter landrush!

I setup this Vagrantfile:

Vagrant.configure("2") do |config|
config.vm.box       = "centos64"
config.vm.box_url   = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box"
config.landrush.enable
config.vm.hostname = "agent.vagrant.dev"
end

Ok, now from the host I can "ping agent.vagrant.dev", which is great. So, then I "vagrant ssh" into the machine. Now, from within the host I can no longer "ping indy.local".

So, my question is: How do I interact with the host from the guest?

Thanks!
Jason

VMWare Fusion provider problem [CORRECTION: CentOS problem]

Hello,
I am having problems with the plugin, and I'm guessing it has to do with me using a VMWare Fusion provider for vagrant. It appears that landrush is attempting to make calls to the guest box before the guest box is booted and available.

    $ vagrant up
    Bringing machine 'default' up with 'vmware_fusion' provider...
    ==> default: Verifying vmnet devices are healthy...
    ==> default: [landrush] Need to configure the host.
    ==> default: [landrush] Mometarily using sudo to put the host config in place...
    Password:
    ==> default: [landrush] starting dns server
    [landrush] Starting daemon...
    [landrush] Waiting for daemon to start...
    ==> default: Preparing network adapters...
    ==> default: Starting the VMware VM...
    Guest-specific operations were attempted on a machine that is not
    ready for guest communication. This should not happen and a bug
    should be reported.

The "Guest-specific operations" error message was in red and is apparently the machine_guest_not_ready message.

The two landrush settings I have enabled are:

    config.landrush.enabled = true
    config.landrush.tld = "custom"

vagrant up works as normal if the two landrush config lines are disabled.

I'm not a ruby guy, so help is appreciated :)

play nicely with resolvconf daemon

right now we just plop ourselves right down in /etc/resolv.conf - which is neither the recommended nor the correct way of overriding DNS on linux.

in fact many (most?) distros run a resolvconf daemon which will periodically overwrite the contents of /etc/resolv.conf and blow away all our hard work.

ive done some initial research; it seems like we could hook into dhclient's config for this. but maybe there is a better way. need to experiment more.

this is high priority since it means that we almost always break after a spell. 💔

auto-generate networks are dhcp, which breaks NFS

If landrush decides that it needs to generate a new private network (message "virtualbox requires an additional private network; adding it"), then it adds a new network using DHCP.

Vagrant's NFS configuration doesn't work with DHCP assigned addresses, leading to an error further down in the init process:

NFS requires a host-only network with a static IP to be created.
Please add a host-only network with a static IP to the machine
for NFS to work.

It looks like there's a plugin that solves the problem of automatically choosing private network static IPs: https://github.com/adrienthebo/vagrant-auto_network . The one downside I see is it seems to assume that all VM ifaces in that subnet were created with vagrant-auto_network, it stores the list of used IPs serialized to disk rather than querying the actual configs (which is probably not possible in Vagrant, to be fair).

windows: fork() function is unimplemented

First time using this and not sure if I'm even using it right :-)

Here is my vagrant file

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "precise32"

  config.vm.box_url = "http://files.vagrantup.com/precise32.box"

  config.landrush.enable

  config.vm.hostname = 'myhost.vagrant.dev'

  #config.vm.network :forwarded_port, guest: 80, host: 3000

  #config.vm.provision :shell, :path => "bootstrap.sh"

end

This is the output

  vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] [landrush] virtualbox requires an additional private network; adding it
[default] [landrush] starting dns server
[landrush] Starting daemon...
[default] Destroying VM and associated drives...
C:/Users/lotus/.vagrant.d/gems/gems/rexec-1.5.2/lib/rexec/daemon/controller.rb:75:in `fork': fork() function is unimplemented on this machine
 (NotImplementedError)
        from C:/Users/lotus/.vagrant.d/gems/gems/rexec-1.5.2/lib/rexec/daemon/controller.rb:75:in `start'
        from C:/Users/lotus/.vagrant.d/gems/gems/rexec-1.5.2/lib/rexec/daemon/base.rb:129:in `start'
        from C:/Users/lotus/.vagrant.d/gems/gems/landrush-0.7.0/lib/landrush/action/setup.rb:39:in `start_server'
        from C:/Users/lotus/.vagrant.d/gems/gems/landrush-0.7.0/lib/landrush/action/setup.rb:20:in `pre_boot_setup'
        from C:/Users/lotus/.vagrant.d/gems/gems/landrush-0.7.0/lib/landrush/action/setup.rb:8:in `block in call'
        from C:/Users/lotus/.vagrant.d/gems/gems/landrush-0.7.0/lib/landrush/action/common.rb:21:in `handle_action_stack'
        from C:/Users/lotus/.vagrant.d/gems/gems/landrush-0.7.0/lib/landrush/action/setup.rb:7:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/clear_network_interfaces.rb:26:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/share_folders.rb:25:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/clear_shared_folders.rb:12:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:11:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/nfs.rb:30:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/prune_nfs_exports.rb:15:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/env_set.rb:19:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/provision.rb:54:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/set_name.rb:47:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/call.rb:57:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builtin/call.rb:57:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/machine.rb:147:in `action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'      

On Windows 7 pro 64bit but running 32bit vagrant and virtualbox
ruby 1.9.3

Wildcard hostnames appear to override explicitly defined hostnames

Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "trusty64"
  config.landrush.enabled = true
  config.landrush.tld = "dev"

  config.vm.define "app" do |layer|
    layer.vm.hostname = "foo.dev"
    layer.vm.network "private_network", ip: "10.10.10.10"
  end

  config.vm.define "db" do |layer|
    layer.vm.hostname = "db.foo.dev"
    layer.vm.network "private_network", ip: "10.10.10.20"
  end
end

Landrush output:

$ vagrant landrush ls
foo.dev                 10.10.10.10
db.foo.dev              10.10.10.20

Domain resolution:

$ dig -p 10053 @localhost foo.dev
...
foo.dev.        0   IN  A   10.10.10.10
....
$ dig -p 10053 @localhost db.foo.dev
...
db.foo.dev.     0   IN  A   10.10.10.10
...

I would have expected db.foo.dev to resolve to 10.10.10.20, but it appears that the implicit wildcard *.foo.dev took precedent...

virtualbox dhcpserver error on boot

get an error message when booting for the first time with virtualbox

will fill in more info with edits - just want an issue number at the moment.

Problem reading vagrant machine IP address

I have a problem with landrush reading my vagrant machine IP address. During vagrant up it logs something like that: [default] [landrush] adding machine entry: mysite.dev => (notice the value is empty). And because of that I cant access mysite.dev.

~/.vagrant.d/data/landrush/hosts.json looks like that:

{
  "mysite.dev": null
}

and when i set there a proper ip, everything works.
I looked up the code and run the statement from read_host_visible_ip_address.rb and it outputs something that looks good to me. The last address is the one i set in Vagrantfie for private_network.

→ ifconfig  | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'     
10.0.2.15
192.168.66.101

Landrush doesn't work with Vagrant 1.5

Any vagrant commands on Vagrant 1.5 result in this error when landrush is installed:

/Users/zain/.vagrant.d/gems/gems/landrush-0.10.0/lib/landrush/action/common.rb:53:in `enabled?': undefined method `landrush' for nil:NilClass (NoMethodError)
    from /Users/zain/.vagrant.d/gems/gems/landrush-0.10.0/lib/landrush/action/teardown.rb:8:in `block in call'
    from /Users/zain/.vagrant.d/gems/gems/landrush-0.10.0/lib/landrush/action/common.rb:21:in `handle_action_stack'
    from /Users/zain/.vagrant.d/gems/gems/landrush-0.10.0/lib/landrush/action/teardown.rb:7:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/graceful_halt.rb:77:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:43:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/discard_state.rb:15:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/env_set.rb:19:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/machine.rb:157:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/commands/destroy/command.rb:30:in `block in execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:200:in `block in with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/commands/destroy/command.rb:29:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/cli.rb:42:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/environment.rb:244:in `cli'
    from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.5.0/bin/vagrant:147:in `<main>'

error when .vagrant_dns.json does not exist

need to make Setup / Teardown smarter about when the file doesn't exist

current workaround is to seed the file with some valid JSON:

echo '{}' > .vagrant_dns.json

don't even get me started on the fact that everything is hooking on $PWD right now - we'll get to that soon enough! 🕐

verbose example Vagrantfile

I have some trouble setting up landrush (im a n00b at ruby), maybe the Vagrantfile could be expanded with some comments and settings to represent a real world example, here's my setup (note: I'm trying to get landrush running with two VMs which I'm not even sure is possible?)

Vagrant.require_plugin "landrush"

Vagrant.configure("2") do |config|
  # Default configuration for Virtualbox
  config.vm.box = 'precise64'
  config.vm.box_url = 'http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-i386-vagrant-disk1.box'

  # Create network
  config.landrush.enable

  config.vm.define :node01 do |node|
    node.vm.hostname = "node01"
    node.vm.network :private_network, ip: "10.1.20.25"
  end

  config.vm.define :node02 do |node|
    node.vm.hostname = "node02"
    node.vm.network :private_network, ip: "10.1.20.50"
  end
end

vagrant up outputs that the dns server is running and the machines are up, but I cannot ping them at http://node02/ or http://whatever.node01/ only at their ips

Thanks for your thoughts and your great work on this plugin :-)

Upsteam nameservers?

Neat. I've been thinking about making this for quite some time.

Why don't use /etc/resolv/tld to specify your nameserver for only this relevant TLDs?

This way the network interfaces DNS will be used rather than forcing Google Public DNS or similar, also it decouples so a failure in your server won't bring the users whole DNS down!

I answered a question on stackexchange about this recently, it's got some links to more info: http://apple.stackexchange.com/questions/86603/how-do-i-add-custom-dns-server-and-preserving-default-dns-of-isp-in-os-x-mountai/86774#86774

Pow (on OS X) uses a similar technique.
Run a nameserver for a specific TLD on a non-priv port, on setup (one-time) prompt for escalation to set up some firewall rules to forward the ports and you're away.

When I get a second I'll see what can be done about submitting a PR with first class OS X support to go with your existing IP tables base.

Landrush doesn't register VMs on Vagrant 1.6

Installed landrush plugin and enabled within the Vagrantfile.

I have two virtual machines which I'm setting hostnames for, however, when I do a vagrant up, landrush doesn't run.

Running vagrant landrush vms also returns 'No Dependant VMs'

This is on, Vagrant 1.6.1 and landrush 0.13.1

Possible issue with IPv6 resolution

I was working on some Vagrantfiles using ubuntu 12.04 & landgrab without any trouble. Upon switching to ubuntu 13, I've noticed that any connection to hosts that lack a AAAA record (e.g., launchpad.net) fail. Removing landrush gets them working again (albeit slowly).

I could also get them working intermittently by adding a public_network interface. I suspect requests that get routed via the private network are hitting landgrab and failing but the public network requests are succeeding.

Still need to dig in more, but thought I'd file the issue incase there were any known issues with IPv6 passthrough.

Add "reconfig" command to read IP address again

When my network configuration changes and my VM gets a new IP address I would like to reconfigure the landrush DNS server without rebooting the box.
I thought about adding something like vagrant landrush reconfig to read the IP address again and reconfigure the DNS server.

@phinze wdyt?

cannot conditionally enable landrush

I have been successful in conditionally enabling vagrant plugins, if they are installed, and thus making them optional. The following works with Vagrant Cachier, but doesn't seem to work with landrush:

 if defined? VagrantPlugins::landrush
    # enable landrush
     config.landrush.enable
 end

Is there a better way to make landrush optional?

VMware Fusion - Not Booting Box

If I disable landrush, it works fine...

Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Cloning VMware VM: 'hashicorp/precise64'. This can take some time...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: [landrush] Host DNS resolver config looks good.
==> default: Preparing network adapters...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Starting the VMware VM...
==> default: [landrush] iptables not installed, installing it
==> default: [landrush] setting up machine's DNS to point to our server
==> default: Stopping the VMware VM...
==> default: Deleting the VM...
/Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/plugin.rb:80:in `require_relative': cannot load such file -- /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/cap/linux/configured_dns_server (LoadError)
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/plugin.rb:80:in `block in <class:Plugin>'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/registry.rb:27:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/registry.rb:27:in `get'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/capability_host.rb:170:in `block in capability_module'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/capability_host.rb:164:in `each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/capability_host.rb:164:in `capability_module'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/capability_host.rb:92:in `capability'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/guest.rb:43:in `capability'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/redirect_dns.rb:26:in `_target_host'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/redirect_dns.rb:14:in `redirect_dns'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/redirect_dns.rb:8:in `block in call'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/common.rb:22:in `handle_action_stack'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/redirect_dns.rb:7:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/common.rb:24:in `handle_action_stack'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/install_prerequisites.rb:7:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:41:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:330:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:160:in `handle'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:42:in `block in call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:474:in `lock'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:41:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:970:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1322:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/set_hostname.rb:16:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:687:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/common.rb:24:in `handle_action_stack'
    from /Users/joel/.vagrant.d/gems/gems/landrush-0.15.0/lib/landrush/action/setup.rb:7:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:904:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/synced_folders.rb:84:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:989:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/provision.rb:80:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:71:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1019:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/box_check_outdated.rb:68:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1233:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:273:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:143:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1098:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:463:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:1233:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:99:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:273:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/joel/.vagrant.d/gems/gems/vagrant-vmware-fusion-3.0.1/lib/vagrant-vmware-fusion/action_farm.rb:160:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/action/runner.rb:66:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:196:in `action_raw'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:173:in `block in action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:474:in `lock'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

Custom TLD not working

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box       = "centos64"
  config.vm.box_url   = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box"
  config.landrush.enable
  config.landrush.tld = "rcs.dev"
  config.vm.hostname = "agent.rcs.dev"
  config.landrush.upstream '10.1.1.11'
end

If I set my hostname to agent.vagrant.dev and exclude the tld line I can ping agent.vagrant.dev. However, with the file above I would expect to be able to ping agent.rsc.dev and that produces an Unknown Host error.

I'm searching for some help/ideas about the custom tld functionality.

My host is OSX Mavericks, guest is CentOS 6.4 and I am using the VMWare Vagrant Provider.

-Jason

Undefined method start - then destroys box

Team,

I am trying to get the plugin working. I am getting an error about an undefined method named color. Please see below for the details and offer any opinions you can. Appreciate the help! I'm not even sure OSX is on the target support list, but here goes...

Software Details

OS: OSX Mavericks 10.9.1
Vagrant Version: 1.4.3
Plugins: landrush (0.9.0), vagrant-vmware-fusion (2.2.8)

Vagrantfile:

Vagrant.configure("2") do |config|
config.vm.box = "centos64"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box"
config.landrush.enable
config.vm.host_name = "agent1.vagrant.dev"
end

Error log

$ vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
[default] Cloning VMware VM: 'centos64'. This can take some time...
[default] Verifying vmnet devices are healthy...
[default] Host DNS resolver config looks good.
[default] [landrush] starting dns server
[default] Deleting the VM...
/Users/jstortz/.vagrant.d/gems/gems/rexec-1.5.2/lib/rexec/daemon/controller.rb:58:in `start': undefined method `color' for "Starting daemon...":String (NoMethodError)
    from /Users/jstortz/.vagrant.d/gems/gems/rexec-1.5.2/lib/rexec/daemon/base.rb:129:in `start'
    from /Users/jstortz/.vagrant.d/gems/gems/landrush-0.9.0/lib/landrush/action/setup.rb:44:in `start_server'
    from /Users/jstortz/.vagrant.d/gems/gems/landrush-0.9.0/lib/landrush/action/setup.rb:21:in `pre_boot_setup'
    from /Users/jstortz/.vagrant.d/gems/gems/landrush-0.9.0/lib/landrush/action/setup.rb:8:in `block in call'
    from /Users/jstortz/.vagrant.d/gems/gems/landrush-0.9.0/lib/landrush/action/common.rb:21:in `handle_action_stack'
    from /Users/jstortz/.vagrant.d/gems/gems/landrush-0.9.0/lib/landrush/action/setup.rb:7:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:858:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/synced_folders.rb:68:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:943:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/provision.rb:52:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/lock.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:80:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:969:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:1183:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:246:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:1048:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:423:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/handle_box_url.rb:30:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:1183:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/lock.rb:42:in `block in call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/lock.rb:27:in `open'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/lock.rb:27:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:108:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jstortz/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.2.8/lib/vagrant-vmware-fusion/action_farm.rb:246:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:147:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

cache based on config file mtime

we don't need to read the .vagrant_dns.json file in every time if we check its mtime and it hasn't changed. should make things a tiny bit faster.

Upstream Resolution Broken in Non-Routed network - Virtualbox on OSX & Ubuntu

Hello, we are having issues with upstream resolution in a private network.

I have explicitily set the upstream DNS to our internal, contactable server yet it does not seem to take effect. I can't resolve any external DNS

If I put the system on a routable internet connection then I get the correct resolution for both internal and external addresses.

I have a feeling that the upstream is not being set correctly and is reverting to this part of code

:upstream_servers => [[:udp, '8.8.8.8', 53], [:tcp, '8.8.8.8', 53]],

Which we can't contact those Google DNS servers internally of course...

Vagrant 1.6.3 landrush (0.14.1)

For completeness sake I've tested against out internal 14.04 images and the vanilla ubuntu provided ones.

vagrant@alpha:~$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.0.2.3
vagrant@alpha:~$ host google.com
;; connection timed out; no servers could be reached
vagrant@alpha:~$ host alpha.vagrant.dev 
alpha.vagrant.dev has address 10.0.199.10
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached

Landrush grabs IPV6 address but does not serve AAAA requests

One of my Debian Weezy machines under Parallels provider responds to hostname -I with both IPv4 and IPv6 address and Landrush picks the latter. When asking Landrush to list machines:

% vagrant landrush list
machine1.vm            10.211.55.33
machine2.vm            fdb2:2c26:f4e4:0:21c:42ff:febc:ea4f

At the sime time Landrush only responds to IN::A requests (and RubyDNS uses Resolv::IPv4 which refuses to create an IPv4 address as response from IPv6 address given by Landrush), therefore machine2.vm does not resolve.

This command should pick last IPv4 address from a guest machine:

hostname -I | awk -F' ' '{for(i = NF; i > 0; i--){ if ($i !~ /:/){print $i; break} }}'

Could you please fix this ASAP, as this might affect more and more people as IPv6 finds ever wider use.

Support for MX Records

It would be nice to have support for MX Records in landrush.
Something like config.landrush.mx 'mail', which will add mail.$hostname.$landrush_tld as MX Record for $hostname.$landrush_tld

couldn't resolve host using curl, but dig works

Using landrush configured like so

  # Caching tier for API
  config.vm.define "varnish-api" do |varnishapi|
    varnishapi.vm.hostname = "varnish-api.#{DOMAIN}"
    varnishapi.vm.network :private_network, ip: "10.1.30.2"
  end

in a basic CentOS box, and I find that dig works but not curl for some domains

[root@varnish-api ~]# curl http://repo.varnish-cache.org
curl: (6) Couldn't resolve host 'repo.varnish-cache.org'

but:

[root@varnish-api ~]# dig repo.varnish-cache.org

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> repo.varnish-cache.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26727
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;repo.varnish-cache.org.        IN  A

;; ANSWER SECTION:
repo.varnish-cache.org. 320 IN  A   194.31.39.155

I tried debugging the network traffic with tcpdump, but honestly I am way out of my depth to diagnose this.

This stops yum install working for many things (like varnish).

how do I override the .dev

Sorry if this is the wrong place to ask, but I'm using landrush succesfully for my local environment. I currently want to move into production, using a different provider.

As I am new to salt and provisioning (and landrush) I am trying to understand how to override hostnames properly.. consider my setup:

Vagrant.configure("2") do |config|
  config.vm.define :salt do |node|
    node.vm.hostname = "salt.vagrant.dev"
  end
  config.vm.define :webserver01 do |node|
    node.vm.hostname = "webserver01.vagrant.dev"
  end
end

Should I create a different Vagrant file for production? There cant be two Vagrantfiles in one directory right.. Should I use some sort of overriding technique? I have tried w/o success..

This fails:

Vagrant.configure("2") do |config|

  config.vm.provider :my_cloud_host do |provider, override|
  end

  config.vm.define :salt do |node, override|
    override.vm.hostname = "salt.example.com"
  end

  config.vm.define :webserver01 do |node, override|
    override.vm.hostname = "webserver01.example.com"
  end

end

Sorry if this is a stupid question, I couldn't find proper directions in the vagrant docs..

Use system DNS servers for upstream_servers default?

Copying @amfranz from #57 (comment)

In my opinion, both things should happen: change the default value for the upstream_servers setting to RubyDNS::System::nameservers as well as change landrush's DNS server logic to never delegate queries for .vagrant.dev upstream but rather respond with "domain not found" if no match is found.

When I configure landrush to use the system DNS servers, I observe delays when answering DNS queries and landrush crashes sometimes. I watched the network traffic with wireshark, here is what I found:

  • Queries for *.vagrant.dev that landrush can not answer and therefore delegates upstream trigger a query loop between dnsmasq and landrush (one delegates to the other, continuously).
  • Queries for *.vagrant.dev that landrush can answer seem to work initially, but sometimes also trigger a query loop if the DNS client sends a IPv6 AAAA query in addition to the A query (because landrush always delegates the AAAA query, which then loops).
  • Sometimes landrush crashes with Malformed message smaller than two bytes received in rubydns-0.7.0/lib/rubydns/handler.rb:112. I don't know the reason for this.

Landrush prevents the machine from reaching internet

I launched vagrant-omnibus on my newly configured machine and it could not reach opscode.com.

When I disabled lanrush, my vm could reach opscode.com again ...

Vagrant.configure("2") do |config|

  config.vm.box = "ubuntu-server-12.10"
  config.vm.box_url = "http://goo.gl/wxdwM"
  config.omnibus.chef_version = :latest
  config.berkshelf.enabled = true
  #config.landrush.enable

  config.vm.provider :virtualbox do |vbox|
    vbox.customize ["modifyvm", :id, "--memory", "512"]
    vbox.customize ["modifyvm", :id, "--cpus", "2"]
    vbox.customize ["modifyvm", :id, "--ioapic", "on"]
    vbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    vbox.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
  end

  # Database
  databases = "#{app_name}-mysql"
  config.vm.define databases do |mysql|
    mysql.vm.hostname = databases
    mysql.vm.network :private_network, ip: "192.168.10.1"

    mysql.vm.provider :virtualbox do |vbox|
      vbox.name = "#{mysql.vm.hostname}"
    end

    mysql.vm.provision "chef_solo" do |chef|
      chef.add_recipe "apt"
      chef.json = {
          "mysql" => {
              "server_root_password" => "*mysql-limber@0",
              "server_debian_password" => "*mysql-limber@0",
              "server_repl_password" => "*mysql-limber@0"
          }
      }
      chef.add_recipe "mysql::server"
    end
  end
end

Nokogiri error on install

I'm getting the below error when trying to install landrush on a freshly installed Vagrant 1.6.2. I got the same error with 1.6.1.

Running under OSX 10.9.2.

Installing the 'landrush' plugin. This can take a few minutes...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Building libxslt-1.1.28 for nokogiri with the following patches applied:
    - 0001-Adding-doc-update-related-to-1.1.28.patch
    - 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
    - 0003-Initialize-pseudo-random-number-generator-with-curre.patch
    - 0004-EXSLT-function-str-replace-is-broken-as-is.patch
    - 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
    - 0007-Separate-function-for-predicate-matching-in-patterns.patch
    - 0008-Fix-direct-pattern-matching.patch
    - 0009-Fix-certain-patterns-with-predicates.patch
    - 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
    - 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
    - 0014-Fix-for-bug-436589.patch
    - 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxslt.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install
************************************************************************
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing nokogiri (1.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2'` succeeds before bundling.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.