Multivm hostname #1280

Closed
wants to merge 54 commits into
from

Conversation

Projects
None yet

kbrock commented Dec 29, 2012

Hi,

When in a multi vm environment, all vms have the same name in virtualbox. This makes it tricky to know which machine is which.

This patch uses the vm's host_name if it is available.

A) This is based upon the 1.0 branch, since that is what I use. Please point me to the 1.1 (master) vs 1.0 (stable) branching strategy FAQ and I can rebase.

B) If you have an example of an action tested / and how much you want to mock out, please let me know. (I saw some good legacy tests that used the environment)

C) Also, I noticed that Environment#root_path is documented to return a String, but the existing code assumes a Pathname is coming out.This threw a wrench into my testing, so please advise and I can fix this as well.

Thanks for the great tool,
Keenan

jhf and others added some commits Apr 30, 2012

@jhf @mitchellh jhf Detect and disable DNS settings that break on Ubuntu 12.04. 99a5749
@mitchellh mitchellh Update version 3242b4b
@mitchellh mitchellh v1.0.3 fb09c4f
@mitchellh mitchellh Fixes a bug where interfaces are assigned in a wrong order when using…
… ruby1.8, causing vm boot to stop as documented in issue #898
bd41440
@oker1 oker1 preserve attributes on packaging when using ruby 1.9.2 9c038c7
@mitchellh mitchellh Merge pull request #951 from oker1/preserve
Preserve attritubes on included files
191dc01
@mitchellh mitchellh Revert "preserve attributes on packaging when using ruby 1.9.2"
This reverts commit 9c038c7.

I didn't mean to backport this.
29d24f7
@pmorton pmorton Update drivers to support reading MAC Addresses ddabacb
@mitchellh mitchellh Merge pull request #966 from pmorton/read_mac_addresses
Add the ability to map mac addresses to interfaces
0e5f076
@mitchellh mitchellh Revert "Update drivers to support reading MAC Addresses"
This reverts commit ddabacb.
536dfc1
@mitchellh mitchellh ssh-config help text uses --host instead of -h 4f62226
@mitchellh mitchellh Use 127.0.0.1 instead of localhost for port use checking. [GH-1057]
Many systems actually don't have "localhost" setup as loopback in their
/etc/hosts file, so this would fail. This makes it pass.
9a4ca51
@mitchellh mitchellh Disable read timeout on Net::HTTP 0b219fb
@mitchellh mitchellh Retry SSH on EHOSTUNREACH errors 8a41237
@mitchellh mitchellh Add missing translation for "saving" state [GH-1110] 4eba2e8
Julian Hille Added driver for VirtualBox 4.2 to 1.0.x stable this is so far not ve…
…ry deep tested. but vagrant up and base commands to work.
f268f62
@mitchellh mitchellh Merge pull request #1120 from julianhille/1-0-stable
Added driver for VirtualBox 4.2 to 1.0.x stable this is so far not very...
04fef0a
@mitchellh mitchellh Update CHANGELOG fd20760
@mitchellh mitchellh v1.0.4 efc7508
@mitchellh mitchellh Update CHANGELOG 5ab18a4
@marklap marklap Update load_plugins to be more Windows friendly. Uses File::PATH_SEPA…
…RATOR instead of hard-coded colon (':').
8c2e7b7
@mitchellh mitchellh Merge pull request #1128 from sbfaulkner/1-0-stable
backport Windows fix onto 1-0-stable
cf00531
@smerrill smerrill Add Fedora 17+ NFS support. 7a4c808
@smerrill smerrill Also change Fedora 16 NFS handling. f7dfce5
@pbrisbin pbrisbin Fix arch host class
1. Detect os by /etc/os-release
2. Bring nfs_cleanup from parent class
3. Use systemd if available
3f68c83
@pbrisbin pbrisbin Remove #nfs? override
My system is now showing nfsd in /proc/filesystems. It must've been
some transient hiccup local to me.
fac08b5
@mitchellh mitchellh Work around 4.2.0 bug on Windows
VirtualBox 4.2.0 on Windows has a critical bug where "showvminfo
--machinereadable" only outputs 5 lines of output no matter what.
Vagrant relies heavily on this output to read things such as network
interfaces, shared folders, etc. Therefore, prior to this commit,
Vagrant was broken on Windows. Note that this is 100% a VIRTUALBOX BUG.
But enough users will use VirtualBox 4.2.0 on Windows that Vagrant must
work around it.

We work around it by introducing "jank mode" for the 4.2 driver on
Windows. On 4.2.0 only on Windows, Vagrant will use the human-readable
version of "showvminfo" and use some pretty crazy regular expressions to
parse out the information it needs. This approach is far less tested but
it at least gets things working again on Windows with 4.2.0. I'm hoping
in the future that Oracle will quickly fix this issue for a 4.2.1, but
I'm not certain yet.

Even if Oracle fixes the issue, this workaround will be in Vagrant
forever to accomodate legacy 4.2.0 users on Windows.
6323a8e
@mitchellh mitchellh Up version for development 7fb503a
@mitchellh mitchellh Need an array for drop_while jank mode f12f556
@mitchellh mitchellh Update CHAGELOG with older pull request dcac900
@mitchellh mitchellh Merge pull request #1140 from smerrill/add-fedora-17-host-1-0-stable
Fedora 16+ NFS support.
f8370ab
@mitchellh mitchellh Update CHANGELOG for GH-1140 ebc00a7
@mitchellh mitchellh Style changes on GH-1140 2d710f5
@mitchellh mitchellh Merge pull request #1142 from pbrisbin/arch-fix-2
Fix arch host class to work with systemd changes
1fb9077
@mitchellh mitchellh Update CHANGELOG for GH-1142 03c3e22
@mitchellh mitchellh Use protected over private, style preference a4cb5a2
@mitchellh mitchellh v1.0.5 be0bc66

Thanks for your efficiency!

Peter Eisentraut and others added some commits Oct 8, 2012

@carlossg Peter Eisentraut Check exit codes of puppet provisioners
Previously, failures in applying the puppet manifests would be
ignored, because puppet apply/agent don't have any useful exit codes
by default.  (Errors are printed, but vagrant continues.)

Use the option --detailed-exitcodes of puppet apply/agent to check for
success.
a0404db
@obscurerichard obscurerichard Fix Windows shell provisioning
Resolves [GH-1036] [GH-1164] [GH-1181]
780dc31
@mitchellh mitchellh Merge pull request #1182 from obscurerichard/fix-windows-shell-provis…
…ioning-vs-1-0-stable

Fix Windows shell provisioning
b33474c
@mitchellh mitchellh Update CHANGELOG and whitespace 3a4c2a0
@mitchellh mitchellh Update version b62e3b0
@mitchellh mitchellh Merge pull request #1180 from maestrodev/v1.0.5-exitcodes
Check exit codes of puppet provisioners
2cb9f97
@mitchellh mitchellh Update CHANGELOG fdae725
@mitchellh mitchellh Fix DNS resolution bug for 12.10 [GH-1176] fd707b0
@mitchellh mitchellh Allow hostname to be a substring of the guest name on Ubuntu [GH-1163] 69c5ad5
@mitchellh mitchellh Become Puppet 3.x compatible [GH-1169] 95d313c
@mitchellh mitchellh Work around bug in OS X 10.8 and VirtualBox wrt VBoxManage
OS X 10.8 introduced a bug where on setuid/setgid executables, it will
print a warning to stdout if any DYLD_ enviornmental variables are set
(most common being DYLD_LIBRARY_PATH).

VirtualBox, specifically VBoxManage, sometimes shells out to external
programs to do some work, reading stdout for the result. The warnings
injected by OS X cause VirtualBox to read bad values, breaking Vagrant.

These work around both of these issues. Great.
e367a8c
@mitchellh mitchellh Update gemspec to not require git for new vagrant installers 562c893
@mitchellh mitchellh Clean LD_LIBRARY_PATH prior to calling VBoxManage as well 97062d3
@mitchellh mitchellh Remove dependency of VirtualBox for running tests e5f58f6
@mitchellh mitchellh v1.0.6 476b19a
@mitchellh mitchellh Update CHANGELOG 54f7d83

This version is currently not pushed to rubygems.org

Owner

mitchellh replied Jan 25, 2013

@spider-network It is now! Sorry about that.

kbrock commented Dec 29, 2012

oops - wrong branch

kbrock closed this Dec 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment