493 Commits

Author SHA1 Message Date
Mitchell Hashimoto
93a4066339 core: SyncedFolders built-in middleware 2013-11-22 16:12:51 -08:00
Rick Harris
87a47abee8 Add resumable downloads
Since VM images can be fairly large and connections rather flaky, it would be
nice to support resumable downloads whereby, if a download is interrupted for
some reason, on the next attempt, it picks up where it left off.

To implement this, the following changes were made:

* The temporary download filename is now constructed from a SHA1 of the
  `box_url` instead of a timestamp. This allows separate invocations of
  Vagrant to 'share' the download-path if the URLs exactly match.

* Add `--continue-at -` option to `curl` which tells it to automatically resume
  downloading where it left off

* Modify the `recover` method in `box_add` to not remove the temporary
  download path if the download was interrupted

Known Issue:

* The progress on a resumed download will look a bit wonky in the sense that,
  it starts at 0% each time, instead of where it left off. Since Vagrant is
  pulling this directly from `curl`, this is more of an upstream issue.

Fixes #57
2013-11-20 15:15:38 -06:00
Fabio Rehm
500deb5138 core: Persist box URL and download date into a JSON file under boxes directory 2013-10-29 13:09:24 -02:00
Fabio Rehm
05a8cf523a core: Get rid of code that deals with box info on a separate statefile 2013-10-29 13:09:24 -02:00
Fabio Rehm
fcfb431362 core: Improve RemoveBoxInfo and WriteBoxInfo docs a bit 2013-10-29 13:09:24 -02:00
Fabio Rehm
1c689d2211 core: Remove box information from state file after box removal 2013-10-29 13:09:23 -02:00
Fabio Rehm
e4b5db829e commands/box: Extract box removal code from box remove command into a builtin action 2013-10-29 13:09:23 -02:00
Fabio Rehm
1443d634c7 core: Write box information after download 2013-10-29 13:09:23 -02:00
Fabio Rehm
670a441a99 core: Scaffold an action for persisting box information 2013-10-29 13:09:23 -02:00
Fabio Rehm
4fa12d896f core: Pass on the newly added box to the rest of the middleware stack 2013-10-29 13:09:23 -02:00
Fabio Rehm
a5c15fd230 core: Fix action name used for ProvisionerRun 2013-10-29 13:08:52 -02:00
Fabio Rehm
2debce9dd9 core: Improve provisioner hooking by introducing a new builtin action for wrapping provisioner runs 2013-10-29 13:08:52 -02:00
Fabio Rehm
00ce442de8 core: Allow hooking before and after provisioners 2013-10-29 13:08:52 -02:00
Teemu Matilainen
88673e4d2e Store the final provision_enabled value to env
Let other middleware actions to know if we are really going to run the
provisioners.
2013-10-27 16:01:22 -03:00
Tianxiang Chen
e1abceee8c Sleep to avoid 100% CPU in waiting time of 'vagrant up' 2013-10-20 20:16:28 -07:00
Mitchell Hashimoto
3090e313f1 core: Create directory before real_path [GH-2196] 2013-09-15 19:50:10 -07:00
Mitchell Hashimoto
e515ca22ab core: sleep between state checks for communicator [GH-2163] 2013-09-15 17:33:05 -07:00
Fabio Rehm
87f8bd8c23 core: Report the proper invalid state when waiting for the guest machine to be ready 2013-09-14 14:35:50 -03:00
Mitchell Hashimoto
e2ddab532d core: Don't provision after first up by default [GH-1776] 2013-09-02 09:03:46 -07:00
Mitchell Hashimoto
5a4c06f75e core: config.ssh.timeout => config.vm.boot_timeout 2013-08-29 16:41:36 -07:00
Mitchell Hashimoto
c38fadfd2f core: config.vm.graceful_halt_timeout to specify graceful halt timeout 2013-08-29 16:38:02 -07:00
Mitchell Hashimoto
261d0ef6cd core: WaitForCommunicator - more robust wait for boot
This is a new built-in middleware that is more robust for
waiting for boots. The "max_tries" configuration is now gone, it is
timeout based. Future commits will make this even better as the
SSH communicator will implement the new "wait_for_ready" in a better
way.
2013-08-29 16:27:00 -07:00
Mitchell Hashimoto
d4c7e20110 core: ProvisionerCleanup task to run cleanup on provisioners 2013-08-29 11:13:43 -07:00
Mitchell Hashimoto
a786bb53d0 --provider on box add supports any format of that provider 2013-07-23 17:36:47 -05:00
Mitchell Hashimoto
af66f5f930 box_download_insecure to not validate https of box_url [GH-1712] 2013-07-20 00:18:02 -04:00
Mitchell Hashimoto
4151df884a Forwarded ports don't auto-correct by default [GH-1701] 2013-07-20 00:15:11 -04:00
Mitchell Hashimoto
cf0ba53fbb box_url works with all box formats a provider supports [GH-1752] 2013-07-19 00:50:00 -04:00
Mitchell Hashimoto
25895b5099 handle_box_url uses new formats 2013-07-19 00:50:00 -04:00
Mitchell Hashimoto
3028940adb NFS allows access from all networks on VM [GH-1204] 2013-07-18 00:01:49 -04:00
Mitchell Hashimoto
a0543d7c7c Use 32-bit integer for NFS fsuid for older kernels [GH-1127] 2013-07-17 23:34:47 -04:00
Mitchell Hashimoto
203594e41a NFS exports with wrong casing on case-insensitive work [GH-1202] 2013-07-17 10:53:24 -07:00
Mitchell Hashimoto
78ef3ded2b Expand symlinks for NFS host path [GH-1101] 2013-07-10 20:21:13 -07:00
Mitchell Hashimoto
e941c549f2 box_url downloading happens before config validation [GH-1061] 2013-07-10 20:10:33 -07:00
Mitchell Hashimoto
f38b6801f9 vagrant destroy exits with 1 if any confirmation are declined [GH-923] 2013-07-10 19:39:20 -07:00
Simon Thulbourn
ef98c7b8b1 passes client cert option from Vagrant file to box_add 2013-05-23 15:13:04 +01:00
Simon Thulbourn
7dd7957a97 adds client cert 2013-05-21 11:42:19 +01:00
Mitchell Hashimoto
4c5262690e Ignore "guest not ready" error when graceful halting [GH-1679] 2013-05-01 18:50:40 -07:00
Mitchell Hashimoto
7524e7a3c0 Box add URL with windows drive letter works properly 2013-04-22 20:41:47 -07:00
Mitchell Hashimoto
14d70776ca Better locking within handle_box_url
This improves locking in the face of parallel providers and
handling box_url parameters. This avoids downloading a box multiple
times.
2013-04-20 14:31:29 -06:00
Mitchell Hashimoto
c29e4d6334 In a multi-machine environment, don't download box multiple [GH-1467] 2013-04-19 23:51:53 -06:00
Mitchell Hashimoto
780a312fc9 Built-in DestroyConfirm middleware 2013-04-19 14:14:29 -06:00
Mitchell Hashimoto
ba2c749d6d Running provisioner output shows provisioner shortcut, not class 2013-04-08 14:50:22 -07:00
Mitchell Hashimoto
162239d2cd Expand file paths when adding boxes in Cygwin 2013-04-07 13:46:46 -07:00
Mitchell Hashimoto
744c879998 Don't repair forwarded port to used forwarded port 2013-04-06 14:12:33 -07:00
Mitchell Hashimoto
17a312b293 Expand the file URL when adding a box 2013-04-05 21:27:00 -07:00
Mitchell Hashimoto
067f431ee9 Better debugging on searching for capabilities 2013-04-03 23:46:39 -07:00
Mitchell Hashimoto
2f232e0175 Halt and mount NFS are caps 2013-04-03 23:33:20 -07:00
Mitchell Hashimoto
61d2f9f96f SetHostname uses new cap system 2013-04-03 23:18:12 -07:00
Mitchell Hashimoto
5e2549fe8b Add "--insecure" flag for downloader 2013-04-03 11:57:40 -07:00
Mitchell Hashimoto
05c6379abb Setup file protocol if adding a box from a file 2013-04-03 08:31:41 -07:00