100 Commits

Author SHA1 Message Date
Mitchell Hashimoto
e0ec679838 vagrant ssh with full console works with new provider.
This works by now calling the `:ssh` action on the provider. This action
is allowed to do whatever it pleases, but should at some point probably
call the `SSHExec` built-in middleware.

The `SSHExec` built-in middleware was added. This uses the information
returned by `Machine#ssh_info` and uses the `Vagrant::Util::SSH` helper
to exec into the remote machine. The provider should do any work upfront
in verifying that the machine is ready to be SSHed into.
2012-08-05 13:45:24 -07:00
Mitchell Hashimoto
984c4f4025 Add Util::SSH which has methods for checking key permissions and exec 2012-08-05 13:12:53 -07:00
Mitchell Hashimoto
5bc0fa1dff Default the IO.select result to empty array to avoid nil errors 2012-06-28 08:22:06 -07:00
Mitchell Hashimoto
0b9173efd9 Handle case that writers is nil on IO.select in subprocess
This can happen when IO.select timeout is reached when we're listening
for writers.
2012-06-27 13:54:05 -07:00
Mitchell Hashimoto
b393de052f Subprocess now only yields stdout/stderr if you're listening 2012-06-01 23:17:48 +02:00
Mitchell Hashimoto
1a6ae81aa9 Require what to be notified for with block and Subprocess.execute
There was an issue before where the stdin buffer would always have space
so it would always yield that block and Ruby would spin at 100%. Now we
require all callers to say what they want to listen for. This drops
CPU down to almost nothing.

See GH-832
2012-06-01 17:02:12 +02:00
Matt Callaway
117a9c146a On Linux where IPv6 is disabled, where /etc/hosts has '::1 localhost', a socket connect to localhost 2222 results in ENETUNREACH which needs to be caught as per this patch. 2012-05-25 15:45:18 -05:00
Mitchell Hashimoto
d08a65e7f7 IsPortOpen utility 2012-03-23 10:26:29 -04:00
Mitchell Hashimoto
641a8daac8 safe_puts to avoid EPIPE [GH-819] 2012-03-18 17:45:49 -06:00
Hendrik Volkmer
28e391cb61 Disable IdentitiesOnly for SunSSH
SunSSH is default on Solaris/OpenSolaris/Illumos. SunSSH does not support
the IdentitiesOnly option. 'vagrant ssh' works when the options is not supplied.
2012-03-18 16:32:15 +01:00
Mitchell Hashimoto
a90f33dcf2 Avoid deadlock behavior on Windows subprocess IO [GH-765] 2012-02-28 09:44:28 -08:00
Mitchell Hashimoto
ba42fffed0 Convert line endings to Unix-style [GH-727] 2012-02-10 18:07:59 -08:00
Mitchell Hashimoto
0ba3824106 Windows subprocess IO works again. [GH-721] 2012-02-10 00:53:22 -08:00
Mitchell Hashimoto
fd54cf0809 vagrant ssh now uses a direct exec() [GH-751]
Before, I was using the "super exec" by passing a single string.
Ruby handles this by actually invoking the command with a shell.
This causes some odd issues with file pathes with spaces and
expansion and other things. This no longer happens.
2012-02-06 15:27:28 -05:00
Mitchell Hashimoto
3eff28ac0d Don't strip color codes with ANSI escape code remover 2012-02-05 13:30:21 +01:00
Mitchell Hashimoto
6c1eafe00e Update CHANGELOG 2012-02-05 13:23:53 +01:00
Joe Kutner
36f43fa676 moved the closing of subprocess streams to after the process has finished. 2012-02-05 13:21:50 +01:00
Mitchell Hashimoto
3a5f0cefb3 Remove ANSI escape codes from SSH output
Note that the ANSI escape code removal is not complete,
but is fairly comprehensive in terms of the codes that
really muck with the terminal layout.
2012-01-23 19:29:07 -08:00
Mitchell Hashimoto
d1e78f791d Remove test warnings, add ANSI escape code remover 2012-01-23 19:24:32 -08:00
Mitchell Hashimoto
97235ee080 Clean up some impl [GH-666] 2012-01-20 11:25:39 -08:00
Jarmo Pertman
b9046a5594 enable colors on Windows when using ANSICON 2012-01-20 11:21:16 -08:00
Mitchell Hashimoto
3f3476f323 Use symbol as a hash key for subprocess. Guarantees we always get a string back. 2012-01-19 17:24:22 -08:00
Mitchell Hashimoto
ef37f692bd Revert the check for duplicate Vagrantfiles.
This is just tricky with case sensitive/insensitive file systems.
Reverting since it doesn't seem worth it.
2012-01-08 23:15:18 -08:00
Mitchell Hashimoto
e85095d1bf Subprocess uses readpartial on IO for Windows [GH-610]
Windows doesn't support read_nonblock.
2012-01-05 23:48:30 -08:00
Mitchell Hashimoto
97f7fa633d Re-implement how networking is done internally 2012-01-02 19:51:38 -08:00
Mitchell Hashimoto
0d2cf4bbe7 Upgrade to ChildProcess 0.2.4 for LaunchError 2011-12-26 19:55:10 -08:00
Mitchell Hashimoto
fd331ee785 Util::Busy calls the callbacks in reverse order 2011-12-26 17:03:29 -08:00
Mitchell Hashimoto
cc9abc8b9b Fix up some subprocess comments 2011-12-22 21:55:57 -08:00
Mitchell Hashimoto
963bdff9fd Use Vagrant::Util::Subprocess for acceptance tests 2011-12-22 21:46:43 -08:00
Mitchell Hashimoto
9f498ccb06 Subprocess now works properly with Ruby 1.8.7 2011-12-22 16:22:41 -08:00
Mitchell Hashimoto
698ad0af7e Import progress works again 2011-12-22 11:29:58 -08:00
Mitchell Hashimoto
79460f6122 Subprocess: Check if data is empty after the process exits as well 2011-12-21 22:12:22 -08:00
Mitchell Hashimoto
271c3827a1 Subprocess: catch any stdout/stderr left over after process exits 2011-12-21 21:58:23 -08:00
Mitchell Hashimoto
63720cc750 Fix reload with VBoxManage 2011-12-21 16:48:19 -08:00
Mitchell Hashimoto
8eb1770b9d Fix issue where we may not get the full output in a subprocess 2011-12-21 14:28:43 -08:00
Mitchell Hashimoto
9debf5abe9 Attach a driver to each VM. Use that to detect VirtualBox. 2011-12-20 21:20:45 -08:00
Mitchell Hashimoto
05ae297fd2 Copy insecure private key to user owned directory [GH-580] 2011-12-11 16:32:25 -08:00
John Watson
8a0a1bddb5 Proper support for NFS in FreeBSD 2011-11-24 21:45:23 -07:00
Eriksen Costa
82c679b9a5 Kernel.exec still failing in OS X Leopard [closes GH-544] 2011-11-24 21:32:44 -07:00
Mitchell Hashimoto
bb06a20843 Add rake acceptance:boxes to download required boxes for tests 2011-11-13 13:37:30 -08:00
Mitchell Hashimoto
1c2f80fab4 Distro dispatch for Host classes 2011-08-27 23:39:02 -07:00
Mitchell Hashimoto
cf115c10b1 Fix errno not defined [closes GH-465] 2011-08-13 18:54:32 -07:00
Mitchell Hashimoto
7df5cf6c9d Fix some issues with the atomic counter and chef-solo 2011-08-03 21:28:29 -07:00
Mitchell Hashimoto
4c6673270a Ruby 1.8 compatibility 2011-07-11 20:13:19 -07:00
Mitchell Hashimoto
0db2ec9d43 Remove ResourceLogger and PlainLogger 2011-07-10 15:35:45 -07:00
Mitchell Hashimoto
050677b359 ResourceLogger doesn't need to be thread-safe. Vagrant is not multi-threaded. 2011-07-10 14:52:22 -07:00
Mitchell Hashimoto
5143556065 Standardize on Util::Platform 2011-07-09 16:51:04 -07:00
Mitchell Hashimoto
1aed9f0f38 Remove leopard/tiger checking and just retry exec using safe_exec 2011-07-09 16:37:12 -07:00
Mitchell Hashimoto
729d62d1ea Chef solo no longer overwrites share folders when multiple provisioners exist 2011-07-07 21:38:07 -07:00
Mitchell Hashimoto
234c47a3a7 Retryable can take multiple exceptions to retry on 2011-04-19 22:24:52 -07:00