Commit Graph

48 Commits

Author SHA1 Message Date
Chris Roberts e5e0274ef5 Update hyperv and docker providers to raise exception on SSH when machine is not ready
This makes the behavior of the docker and hyperv provider consistent with the
virtualbox provider by raising an error on ssh actions if the machine is not
created or not running.

Fixes #8508
2017-05-05 14:01:12 -07:00
Ray Ruvinskiy e42f346b1d
Make `start` action run provisioners if VM is running
Previously, there was no one gesture that would start a VM if it was not
running and run the appropriate provisioners regardless of its original
state. `vagrant up` did nothing if the VM was running, while
`vagrant provision` did nothing if the VM was not running.

Change the semantics of `vagrant up`, via the start actions of the providers,
to go through the provisioning logic even if the VM is already running.
The semantics of `run: "once"` vs `run: "always"` are respected.

Tested with the VirtualBox provider but not the others.

Resolves #4421
2016-05-27 19:00:33 -04:00
Seth Vargo 825bd6d5ef Run provisioner cleanup tasks before destroying the VM 2015-11-19 11:14:31 -08:00
Mitchell Hashimoto f1618f5ec8 providers/docker: don't remove image on reload for build cache 2015-07-09 14:23:26 -06:00
Adrian Guenter 9bdefb5c59 Don't destroy built Docker image on reload 2015-07-09 16:15:56 -04:00
Mitchell Hashimoto 9dd87b289e providers/docker: validate config after HandleBox [GH-5667] 2015-07-08 17:45:32 -06:00
Mitchell Hashimoto 855aa66ad9 providers/docker: better error on suspend 2015-07-08 10:18:43 -06:00
Mitchell Hashimoto c2cae80de5 providers/dock: pull image prior to starting 2015-07-08 10:09:15 -06:00
Mitchell Hashimoto 1e6259dd00 providers/docker: set preparing set to avoid data dir clear [GH-3873] 2014-10-22 20:52:08 -07:00
Mitchell Hashimoto 296d0639cc providers/docker: support auth [GH-4042] 2014-10-22 13:12:31 -07:00
Mitchell Hashimoto 5228437b30 providers/docker: nicer error if package is called [GH-4595] 2014-10-21 17:04:46 -07:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto f2b4f5411a providers/docker: don't use graceful shutdown [GH-3798] 2014-05-17 12:16:32 -07:00
Mitchell Hashimoto aee71a093b providers/docker: forward ports properly 2014-05-08 13:37:55 -07:00
Mitchell Hashimoto 337e51c2a6 providers/docker: don't reload if not created 2014-05-05 22:06:22 -07:00
Mitchell Hashimoto 38d1f0c0aa providers/docker: smarter destroy, does not require host machine 2014-05-05 22:02:13 -07:00
Mitchell Hashimoto ff2f035f27 providers/docker: less hack way to clear ID if not created 2014-05-05 21:37:02 -07:00
Mitchell Hashimoto b26ecb0150 providers/docker: smarter about setting ID to nil for machine 2014-05-05 21:35:08 -07:00
Mitchell Hashimoto 8ed5351dd1 providers/docker: destroy built image on up 2014-04-27 19:36:02 -07:00
Mitchell Hashimoto 27cd8886b3 providers/docker: cleaner reload 2014-04-27 19:27:11 -07:00
Mitchell Hashimoto 12d3e06f69 providers/docker: can docker-run non-existent containers 2014-04-27 19:22:14 -07:00
Mitchell Hashimoto ff9de3586a providers/docker: run_command doesn't need to actual setup host machine 2014-04-27 18:28:11 -07:00
Mitchell Hashimoto abf7c0526b providers/docker: docker-run command starting points 2014-04-27 18:10:41 -07:00
Mitchell Hashimoto f78f72920c providers/docker: flatten stack so it runs at one point 2014-04-21 13:56:04 -07:00
Mitchell Hashimoto 067c1ca348 providers/docker: reuse action stacks where possible 2014-04-21 13:56:02 -07:00
Mitchell Hashimoto 67741ad902 providers/docker: fix ordering of removing built images 2014-04-21 13:56:01 -07:00
Mitchell Hashimoto 16ae728b5f providers/docker: remove built image on reload and destroy 2014-04-21 13:55:55 -07:00
Mitchell Hashimoto 81df70eee0 providers/docker: support building Dockerfiles 2014-04-21 13:55:54 -07:00
Mitchell Hashimoto 0a3346c918 providers/docker: warning if synced folders change 2014-04-21 13:55:48 -07:00
Mitchell Hashimoto d1b3165545 providers/docker: cleaner action stacks 2014-04-21 13:55:47 -07:00
Mitchell Hashimoto 35d9256137 providers/docker: only provision if ssh (command) 2014-04-21 13:55:46 -07:00
Mitchell Hashimoto 81818f36fc providers/docker: graceful halt only if SSH is available 2014-04-21 13:55:45 -07:00
Mitchell Hashimoto 4a59c5c522 providers/docker: optimizing the action stacks... 2014-04-21 13:55:44 -07:00
Mitchell Hashimoto c0f5095783 providers/docker: wait for running state, error if not 2014-04-21 13:55:42 -07:00
Mitchell Hashimoto 09cc823065 providers/docker: warning with host VM about forwarded ports 2014-04-21 13:55:41 -07:00
Mitchell Hashimoto e578e91e3a providers/docker: implement port checker for remote machine 2014-04-21 13:55:39 -07:00
Mitchell Hashimoto 4dabfc1aff providers/docker: clean up forwarded port handling 2014-04-21 13:55:37 -07:00
Mitchell Hashimoto 6ea6ad3e08 providers/docker: only correct port collisions if not host VM 2014-04-21 13:55:36 -07:00
Mitchell Hashimoto cd38f891da providers/docker: disable synced folders on destroy 2014-04-21 13:55:27 -07:00
Mitchell Hashimoto 10e51eb141 providers/docker: initial sync folders working through proxy VM 2014-04-21 13:55:20 -07:00
Mitchell Hashimoto e714720052 providers/docker: `vagrant ssh` proxies through the host VM 2014-04-21 13:54:54 -07:00
Mitchell Hashimoto 8c7ab333a0 Squash the f-docker-hostmachine branch.
Initial work

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

providers/docker: create a docker host VM if needed

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

providers/docker: vagrant executor

providers/docker: support creating the machine

providers/docker: status works if host VM is gone

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

core: Call preserves stack ordering

core: support Message post option

providers/docker: Guard some features with HasSSH checks

providers/docker: much better messaging around create/destroy

providers/docker: output the container ID on create

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

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

providers/docker: HandleBox before the host machine

providers/virtualbox: functional_vboxsf to disable vboxsf

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

providers/docker: default machine name to :default
2014-04-21 13:54:33 -07:00
Fabio Rehm c0aa05c62a providers/docker: Handle forwarded port collisions 2014-04-21 13:51:46 -07:00
Fabio Rehm 46cbeb38f0 providers/docker: Make use of Action::Builtin::IsState and remove provider specific actions 2014-04-21 13:51:42 -07:00
Fabio Rehm 29f2d9b09d providers/docker: Remove custom Action::Message 2014-04-21 13:51:41 -07:00
Fabio Rehm 15605b1a81 providers/docker: Switch to new HandleBox middleware 2014-04-21 13:51:39 -07:00
Fabio Rehm eaa4be8869 providers/docker: Remove Vagrant::Action shortcuts as we are on core now 2014-04-21 13:51:38 -07:00
Fabio Rehm e79df6caaa providers/docker: Move code out of lib dir so that Vagrant can pick it up 2014-04-21 13:51:32 -07:00
Renamed from plugins/providers/docker/lib/action.rb (Browse further)