tnargav 1.2.3 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +19 -3
- data/CHANGELOG.md +311 -0
- data/bin/vagrant +12 -0
- data/config/default.rb +2 -4
- data/keys/README.md +0 -7
- data/lib/vagrant.rb +7 -0
- data/lib/vagrant/action.rb +2 -0
- data/lib/vagrant/action/builtin/box_add.rb +12 -1
- data/lib/vagrant/action/builtin/confirm.rb +1 -0
- data/lib/vagrant/action/builtin/graceful_halt.rb +9 -5
- data/lib/vagrant/action/builtin/handle_box_url.rb +16 -7
- data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +1 -1
- data/lib/vagrant/action/builtin/mixin_provisioners.rb +43 -0
- data/lib/vagrant/action/builtin/nfs.rb +18 -8
- data/lib/vagrant/action/builtin/provision.rb +30 -21
- data/lib/vagrant/action/builtin/provisioner_cleanup.rb +35 -0
- data/lib/vagrant/action/builtin/wait_for_communicator.rb +84 -0
- data/lib/vagrant/action/warden.rb +2 -1
- data/lib/vagrant/box_collection.rb +62 -44
- data/lib/vagrant/cli.rb +1 -9
- data/lib/vagrant/config/v2/root.rb +6 -0
- data/lib/vagrant/environment.rb +27 -51
- data/lib/vagrant/errors.rb +33 -1
- data/lib/vagrant/guest.rb +2 -2
- data/lib/vagrant/machine.rb +14 -22
- data/lib/vagrant/plugin/v2/command.rb +4 -1
- data/lib/vagrant/plugin/v2/communicator.rb +21 -0
- data/lib/vagrant/plugin/v2/guest.rb +1 -56
- data/lib/vagrant/plugin/v2/provisioner.rb +6 -0
- data/lib/vagrant/util/downloader.rb +7 -2
- data/lib/vagrant/util/platform.rb +43 -0
- data/lib/vagrant/util/ssh.rb +5 -0
- data/lib/vagrant/util/subprocess.rb +16 -2
- data/lib/vagrant/version.rb +1 -1
- data/plugins/commands/box/command/remove.rb +22 -2
- data/plugins/commands/box/command/repackage.rb +1 -1
- data/plugins/commands/destroy/command.rb +8 -3
- data/plugins/commands/help/command.rb +12 -0
- data/plugins/commands/help/plugin.rb +17 -0
- data/plugins/commands/plugin/action.rb +11 -0
- data/plugins/commands/plugin/action/install_gem.rb +26 -1
- data/plugins/commands/plugin/action/plugin_exists_check.rb +26 -0
- data/plugins/commands/plugin/command/install.rb +4 -21
- data/plugins/commands/plugin/command/mixin_install_opts.rb +30 -0
- data/plugins/commands/plugin/command/root.rb +5 -0
- data/plugins/commands/plugin/command/update.rb +41 -0
- data/plugins/commands/reload/command.rb +4 -0
- data/plugins/commands/status/command.rb +6 -1
- data/plugins/commands/up/command.rb +10 -0
- data/plugins/commands/up/start_mixins.rb +12 -1
- data/plugins/communicators/ssh/communicator.rb +61 -6
- data/plugins/guests/arch/cap/change_host_name.rb +1 -2
- data/plugins/guests/arch/cap/configure_networks.rb +6 -0
- data/plugins/guests/coreos/cap/change_host_name.rb +15 -0
- data/plugins/guests/coreos/cap/configure_networks.rb +72 -0
- data/plugins/guests/coreos/guest.rb +9 -0
- data/plugins/guests/coreos/plugin.rb +25 -0
- data/plugins/guests/darwin/cap/change_host_name.rb +14 -0
- data/plugins/guests/darwin/cap/configure_networks.rb +52 -0
- data/plugins/guests/darwin/cap/halt.rb +16 -0
- data/plugins/guests/darwin/cap/mount_nfs_folder.rb +25 -0
- data/plugins/guests/darwin/cap/mount_vmware_shared_folder.rb +36 -0
- data/plugins/guests/darwin/cap/shell_expand_guest_path.rb +26 -0
- data/plugins/guests/darwin/cap/verify_vmware_hgfs.rb +12 -0
- data/plugins/guests/darwin/guest.rb +15 -0
- data/plugins/guests/darwin/plugin.rb +50 -0
- data/plugins/guests/debian/cap/change_host_name.rb +1 -0
- data/plugins/guests/gentoo/guest.rb +1 -1
- data/plugins/guests/linux/cap/mount_nfs.rb +9 -1
- data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +26 -7
- data/plugins/guests/linux/cap/shell_expand_guest_path.rb +4 -1
- data/plugins/guests/openbsd/cap/change_host_name.rb +14 -0
- data/plugins/guests/openbsd/cap/configure_networks.rb +40 -0
- data/plugins/guests/openbsd/cap/mount_nfs_folder.rb +14 -0
- data/plugins/guests/openbsd/plugin.rb +15 -0
- data/plugins/guests/solaris/cap/halt.rb +2 -1
- data/plugins/guests/solaris/cap/mount_virtualbox_shared_folder.rb +4 -1
- data/plugins/guests/solaris11/cap/change_host_name.rb +25 -0
- data/plugins/guests/solaris11/cap/configure_networks.rb +32 -0
- data/plugins/guests/solaris11/cap/halt.rb +26 -0
- data/plugins/guests/solaris11/cap/mount_virtualbox_shared_folder.rb +35 -0
- data/plugins/guests/solaris11/config.rb +22 -0
- data/plugins/guests/solaris11/guest.rb +15 -0
- data/plugins/guests/solaris11/plugin.rb +44 -0
- data/plugins/guests/suse/cap/configure_networks.rb +60 -0
- data/plugins/guests/suse/plugin.rb +5 -0
- data/plugins/guests/ubuntu/cap/change_host_name.rb +1 -0
- data/plugins/guests/ubuntu/cap/mount_nfs.rb +19 -0
- data/plugins/guests/ubuntu/cap/mount_virtualbox_shared_folder.rb +14 -0
- data/plugins/guests/ubuntu/guest.rb +0 -19
- data/plugins/guests/ubuntu/plugin.rb +10 -0
- data/plugins/hosts/arch/host.rb +5 -28
- data/plugins/hosts/bsd/host.rb +83 -7
- data/plugins/hosts/fedora/host.rb +12 -6
- data/plugins/hosts/gentoo/host.rb +3 -1
- data/plugins/hosts/linux/host.rb +42 -9
- data/plugins/hosts/opensuse/host.rb +3 -1
- data/plugins/hosts/slackware/host.rb +26 -0
- data/plugins/hosts/slackware/plugin.rb +15 -0
- data/plugins/kernel_v1/config/ssh.rb +2 -2
- data/plugins/kernel_v2/config/ssh.rb +8 -16
- data/plugins/kernel_v2/config/vm.rb +68 -11
- data/plugins/providers/virtualbox/action.rb +15 -2
- data/plugins/providers/virtualbox/action/boot.rb +0 -26
- data/plugins/providers/virtualbox/action/clear_network_interfaces.rb +1 -1
- data/plugins/providers/virtualbox/action/customize.rb +10 -3
- data/plugins/providers/virtualbox/action/destroy_unused_network_interfaces.rb +8 -1
- data/plugins/providers/virtualbox/action/forward_ports.rb +1 -0
- data/plugins/providers/virtualbox/action/import.rb +3 -0
- data/plugins/providers/virtualbox/action/network.rb +14 -2
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +7 -2
- data/plugins/providers/virtualbox/action/set_name.rb +13 -1
- data/plugins/providers/virtualbox/config.rb +39 -2
- data/plugins/providers/virtualbox/driver/base.rb +5 -0
- data/plugins/providers/virtualbox/driver/meta.rb +7 -1
- data/plugins/providers/virtualbox/driver/version_4_0.rb +2 -2
- data/plugins/providers/virtualbox/driver/version_4_1.rb +2 -2
- data/plugins/providers/virtualbox/driver/version_4_2.rb +17 -0
- data/plugins/providers/virtualbox/model/forwarded_port.rb +7 -1
- data/plugins/providers/virtualbox/util/compile_forwarded_ports.rb +5 -1
- data/plugins/provisioners/ansible/config.rb +40 -23
- data/plugins/provisioners/ansible/provisioner.rb +68 -13
- data/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb +1 -1
- data/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb +1 -1
- data/plugins/provisioners/cfengine/config.rb +7 -1
- data/plugins/provisioners/cfengine/provisioner.rb +4 -5
- data/plugins/provisioners/chef/config/base.rb +31 -0
- data/plugins/provisioners/chef/config/chef_client.rb +15 -6
- data/plugins/provisioners/chef/config/chef_solo.rb +18 -11
- data/plugins/provisioners/chef/provisioner/base.rb +23 -3
- data/plugins/provisioners/chef/provisioner/chef_client.rb +25 -6
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +16 -13
- data/plugins/provisioners/file/config.rb +29 -0
- data/plugins/provisioners/file/plugin.rb +23 -0
- data/plugins/provisioners/file/provisioner.rb +16 -0
- data/plugins/provisioners/puppet/config/puppet.rb +4 -1
- data/plugins/provisioners/puppet/provisioner/puppet.rb +15 -9
- data/plugins/provisioners/puppet/provisioner/puppet_server.rb +9 -2
- data/plugins/provisioners/salt/bootstrap-salt.sh +6 -0
- data/plugins/provisioners/salt/config.rb +105 -0
- data/plugins/provisioners/salt/errors.rb +11 -0
- data/plugins/provisioners/salt/plugin.rb +22 -0
- data/plugins/provisioners/salt/provisioner.rb +249 -0
- data/plugins/provisioners/shell/config.rb +11 -2
- data/plugins/provisioners/shell/provisioner.rb +15 -3
- data/scripts/website_push_docs.sh +12 -0
- data/scripts/website_push_www.sh +12 -0
- data/templates/commands/init/Vagrantfile.erb +5 -2
- data/templates/commands/ssh_config/config.erb +4 -0
- data/templates/guests/coreos/etcd.service.erb +10 -0
- data/templates/guests/fedora/network_static.erb +2 -3
- data/templates/guests/openbsd/network_dhcp.erb +1 -0
- data/templates/guests/openbsd/network_static.erb +1 -0
- data/templates/guests/suse/network_dhcp.erb +6 -0
- data/templates/guests/suse/network_static.erb +10 -0
- data/templates/locales/en.yml +123 -13
- data/templates/nfs/exports.erb +4 -4
- data/templates/nfs/exports_freebsd.erb +4 -4
- data/templates/nfs/exports_linux.erb +5 -3
- data/templates/provisioners/chef_client/client.erb +9 -0
- data/templates/provisioners/chef_solo/solo.erb +19 -1
- data/test/unit/vagrant/action/builtin/graceful_halt_test.rb +1 -2
- data/test/unit/vagrant/cli_test.rb +1 -0
- data/test/unit/vagrant/config/v2/root_test.rb +18 -0
- data/test/unit/vagrant/environment_test.rb +25 -0
- data/test/unit/vagrant/util/downloader_test.rb +4 -4
- data/test/unit/vagrant_test.rb +18 -0
- data/website/docs/.buildpacks +2 -0
- data/website/docs/Gemfile +13 -0
- data/website/docs/Gemfile.lock +141 -0
- data/website/docs/Procfile +1 -0
- data/website/docs/README.md +26 -0
- data/website/docs/config.rb +78 -0
- data/website/docs/config.ru +44 -0
- data/website/docs/helpers/sidebar_helpers.rb +19 -0
- data/website/docs/lib/redirect_to_latest.rb +25 -0
- data/website/docs/lib/redirect_v1_docs.rb +26 -0
- data/website/docs/source/404.html.erb +7 -0
- data/website/docs/source/images/bullet_1.png +0 -0
- data/website/docs/source/images/bullet_2.png +0 -0
- data/website/docs/source/images/bullet_3.png +0 -0
- data/website/docs/source/images/customers.png +0 -0
- data/website/docs/source/images/customers_small.png +0 -0
- data/website/docs/source/images/footer_background.png +0 -0
- data/website/docs/source/images/footer_hashi_logo.png +0 -0
- data/website/docs/source/images/footer_vagrant_logo.png +0 -0
- data/website/docs/source/images/get_started_background.png +0 -0
- data/website/docs/source/images/icon_caution.png +0 -0
- data/website/docs/source/images/logo_docs.png +0 -0
- data/website/docs/source/images/logo_docs_small.png +0 -0
- data/website/docs/source/images/logo_small.png +0 -0
- data/website/docs/source/images/logo_vagrant.png +0 -0
- data/website/docs/source/images/open_close.png +0 -0
- data/website/docs/source/images/search_icon.png +0 -0
- data/website/docs/source/images/sidebar_background_docs.png +0 -0
- data/website/docs/source/images/sidebar_background_inner.png +0 -0
- data/website/docs/source/images/steps_background.png +0 -0
- data/website/docs/source/images/vagrant_header_background.png +0 -0
- data/website/docs/source/index.html.erb +0 -0
- data/website/docs/source/javascripts/backstretch.js +4 -0
- data/website/docs/source/javascripts/bootstrap.min.js +7 -0
- data/website/docs/source/javascripts/fittext.js +43 -0
- data/website/docs/source/javascripts/grid-overlay.js +161 -0
- data/website/docs/source/javascripts/jquery.js +2 -0
- data/website/docs/source/javascripts/less-1.3.0.min.js +9 -0
- data/website/docs/source/javascripts/modernizr.js +1384 -0
- data/website/docs/source/javascripts/vagrantup.js +15 -0
- data/website/docs/source/layouts/layout.erb +266 -0
- data/website/docs/source/stylesheets/_base.less +317 -0
- data/website/docs/source/stylesheets/_components.less +74 -0
- data/website/docs/source/stylesheets/_footer.less +101 -0
- data/website/docs/source/stylesheets/_media-queries.less +452 -0
- data/website/docs/source/stylesheets/_mixins.less +174 -0
- data/website/docs/source/stylesheets/_nav.less +71 -0
- data/website/docs/source/stylesheets/_pages.less +276 -0
- data/website/docs/source/stylesheets/_sidebar.less +136 -0
- data/website/docs/source/stylesheets/_type.less +36 -0
- data/website/docs/source/stylesheets/_variables.less +39 -0
- data/website/docs/source/stylesheets/bootstrap.css +5946 -0
- data/website/docs/source/stylesheets/vagrantup.less +16 -0
- data/website/docs/source/v2/boxes.html.md +78 -0
- data/website/docs/source/v2/boxes/format.html.md +32 -0
- data/website/docs/source/v2/cli/box.html.md +62 -0
- data/website/docs/source/v2/cli/destroy.html.md +20 -0
- data/website/docs/source/v2/cli/halt.html.md +19 -0
- data/website/docs/source/v2/cli/index.html.md +24 -0
- data/website/docs/source/v2/cli/init.html.md +18 -0
- data/website/docs/source/v2/cli/package.html.md +43 -0
- data/website/docs/source/v2/cli/plugin.html.md +56 -0
- data/website/docs/source/v2/cli/provision.html.md +24 -0
- data/website/docs/source/v2/cli/reload.html.md +27 -0
- data/website/docs/source/v2/cli/resume.html.md +11 -0
- data/website/docs/source/v2/cli/ssh.html.md +24 -0
- data/website/docs/source/v2/cli/ssh_config.html.md +16 -0
- data/website/docs/source/v2/cli/status.html.md +14 -0
- data/website/docs/source/v2/cli/suspend.html.md +19 -0
- data/website/docs/source/v2/cli/up.html.md +34 -0
- data/website/docs/source/v2/debugging.html.md +42 -0
- data/website/docs/source/v2/getting-started/boxes.html.md +56 -0
- data/website/docs/source/v2/getting-started/index.html.md +43 -0
- data/website/docs/source/v2/getting-started/networking.html.md +45 -0
- data/website/docs/source/v2/getting-started/project_setup.html.md +38 -0
- data/website/docs/source/v2/getting-started/providers.html.md +37 -0
- data/website/docs/source/v2/getting-started/provisioning.html.md +75 -0
- data/website/docs/source/v2/getting-started/rebuild.html.md +17 -0
- data/website/docs/source/v2/getting-started/synced_folders.html.md +42 -0
- data/website/docs/source/v2/getting-started/teardown.html.md +41 -0
- data/website/docs/source/v2/getting-started/up.html.md +35 -0
- data/website/docs/source/v2/index.html.md +10 -0
- data/website/docs/source/v2/installation/backwards-compatibility.html.md +35 -0
- data/website/docs/source/v2/installation/index.html.md +28 -0
- data/website/docs/source/v2/installation/uninstallation.html.md +39 -0
- data/website/docs/source/v2/installation/upgrading-from-1-0.html.md +26 -0
- data/website/docs/source/v2/installation/upgrading.html.md +20 -0
- data/website/docs/source/v2/multi-machine/index.html.md +105 -0
- data/website/docs/source/v2/networking/basic_usage.html.md +43 -0
- data/website/docs/source/v2/networking/forwarded_ports.html.md +57 -0
- data/website/docs/source/v2/networking/index.html.md +40 -0
- data/website/docs/source/v2/networking/private_network.html.md +48 -0
- data/website/docs/source/v2/networking/public_network.html.md +53 -0
- data/website/docs/source/v2/plugins/commands.html.md +116 -0
- data/website/docs/source/v2/plugins/configuration.html.md +166 -0
- data/website/docs/source/v2/plugins/development-basics.html.md +139 -0
- data/website/docs/source/v2/plugins/guest-capabilities.html.md +100 -0
- data/website/docs/source/v2/plugins/guests.html.md +99 -0
- data/website/docs/source/v2/plugins/hosts.html.md +46 -0
- data/website/docs/source/v2/plugins/index.html.md +21 -0
- data/website/docs/source/v2/plugins/packaging.html.md +102 -0
- data/website/docs/source/v2/plugins/providers.html.md +234 -0
- data/website/docs/source/v2/plugins/provisioners.html.md +64 -0
- data/website/docs/source/v2/plugins/usage.html.md +58 -0
- data/website/docs/source/v2/providers/basic_usage.html.md +67 -0
- data/website/docs/source/v2/providers/configuration.html.md +89 -0
- data/website/docs/source/v2/providers/custom.html.md +9 -0
- data/website/docs/source/v2/providers/default.html.md +22 -0
- data/website/docs/source/v2/providers/index.html.md +23 -0
- data/website/docs/source/v2/providers/installation.html.md +11 -0
- data/website/docs/source/v2/provisioning/ansible.html.md +144 -0
- data/website/docs/source/v2/provisioning/basic_usage.html.md +67 -0
- data/website/docs/source/v2/provisioning/chef_client.html.md +109 -0
- data/website/docs/source/v2/provisioning/chef_solo.html.md +156 -0
- data/website/docs/source/v2/provisioning/index.html.md +28 -0
- data/website/docs/source/v2/provisioning/puppet_agent.html.md +70 -0
- data/website/docs/source/v2/provisioning/puppet_apply.html.md +114 -0
- data/website/docs/source/v2/provisioning/shell.html.md +88 -0
- data/website/docs/source/v2/synced-folders/basic_usage.html.md +53 -0
- data/website/docs/source/v2/synced-folders/index.html.md +17 -0
- data/website/docs/source/v2/synced-folders/nfs.html.md +53 -0
- data/website/docs/source/v2/vagrantfile/index.html.md +75 -0
- data/website/docs/source/v2/vagrantfile/machine_settings.html.md +84 -0
- data/website/docs/source/v2/vagrantfile/ssh_settings.html.md +61 -0
- data/website/docs/source/v2/vagrantfile/vagrant_settings.html.md +19 -0
- data/website/docs/source/v2/vagrantfile/version.html.md +64 -0
- data/website/docs/source/v2/virtualbox/boxes.html.md +71 -0
- data/website/docs/source/v2/virtualbox/configuration.html.md +63 -0
- data/website/docs/source/v2/virtualbox/index.html.md +21 -0
- data/website/docs/source/v2/virtualbox/usage.html.md +12 -0
- data/website/docs/source/v2/vmware/boxes.html.md +107 -0
- data/website/docs/source/v2/vmware/configuration.html.md +91 -0
- data/website/docs/source/v2/vmware/index.html.md +30 -0
- data/website/docs/source/v2/vmware/installation.html.md +40 -0
- data/website/docs/source/v2/vmware/known-issues.html.md +21 -0
- data/website/docs/source/v2/vmware/usage.html.md +27 -0
- data/website/docs/source/v2/why-vagrant/index.html.md +46 -0
- data/website/www/.buildpacks +2 -0
- data/website/www/Gemfile +15 -0
- data/website/www/Gemfile.lock +123 -0
- data/website/www/Procfile +1 -0
- data/website/www/README.md +26 -0
- data/website/www/config.rb +88 -0
- data/website/www/config.ru +39 -0
- data/website/www/helpers/sidebar_helpers.rb +12 -0
- data/website/www/lib/legacy_redirect.rb +32 -0
- data/website/www/source/404.html.erb +11 -0
- data/website/www/source/_sidebar_about.erb +5 -0
- data/website/www/source/_sidebar_blog.erb +11 -0
- data/website/www/source/_sidebar_support.html.erb +6 -0
- data/website/www/source/about.html.markdown +16 -0
- data/website/www/source/blog.html.erb +34 -0
- data/website/www/source/blog/2013-09-16-test.html.markdown +26 -0
- data/website/www/source/blog_feed.xml.builder +23 -0
- data/website/www/source/images/bullet_1.png +0 -0
- data/website/www/source/images/bullet_2.png +0 -0
- data/website/www/source/images/bullet_3.png +0 -0
- data/website/www/source/images/customers.png +0 -0
- data/website/www/source/images/customers_small.png +0 -0
- data/website/www/source/images/footer_background.png +0 -0
- data/website/www/source/images/footer_hashi_logo.png +0 -0
- data/website/www/source/images/footer_vagrant_logo.png +0 -0
- data/website/www/source/images/get_started_background.png +0 -0
- data/website/www/source/images/icon_caution.png +0 -0
- data/website/www/source/images/logo_docs.png +0 -0
- data/website/www/source/images/logo_docs_small.png +0 -0
- data/website/www/source/images/logo_small.png +0 -0
- data/website/www/source/images/logo_vagrant.png +0 -0
- data/website/www/source/images/open_close.png +0 -0
- data/website/www/source/images/search_icon.png +0 -0
- data/website/www/source/images/sidebar_background_docs.png +0 -0
- data/website/www/source/images/sidebar_background_inner.png +0 -0
- data/website/www/source/images/sponsors/fastly.png +0 -0
- data/website/www/source/images/sponsors/kiip.png +0 -0
- data/website/www/source/images/sponsors/softlayer.jpg +0 -0
- data/website/www/source/images/sponsors/typekit.png +0 -0
- data/website/www/source/images/steps_background.png +0 -0
- data/website/www/source/images/vagrant_header_background.png +0 -0
- data/website/www/source/images/vagrant_vmware_background.png +0 -0
- data/website/www/source/index.html.erb +109 -0
- data/website/www/source/javascripts/backstretch.js +4 -0
- data/website/www/source/javascripts/bootstrap.min.js +7 -0
- data/website/www/source/javascripts/fittext.js +43 -0
- data/website/www/source/javascripts/grid-overlay.js +161 -0
- data/website/www/source/javascripts/jquery.js +2 -0
- data/website/www/source/javascripts/less-1.3.0.min.js +9 -0
- data/website/www/source/javascripts/modernizr.js +1384 -0
- data/website/www/source/javascripts/vagrantup.js +58 -0
- data/website/www/source/layouts/blog_post.erb +42 -0
- data/website/www/source/layouts/inner.erb +34 -0
- data/website/www/source/layouts/layout.erb +107 -0
- data/website/www/source/sponsors.html.erb +23 -0
- data/website/www/source/stylesheets/_base.less +326 -0
- data/website/www/source/stylesheets/_components.less +74 -0
- data/website/www/source/stylesheets/_footer.less +101 -0
- data/website/www/source/stylesheets/_media-queries.less +549 -0
- data/website/www/source/stylesheets/_mixins.less +175 -0
- data/website/www/source/stylesheets/_modules.less +37 -0
- data/website/www/source/stylesheets/_nav.less +74 -0
- data/website/www/source/stylesheets/_pages.less +467 -0
- data/website/www/source/stylesheets/_sidebar.less +137 -0
- data/website/www/source/stylesheets/_type.less +36 -0
- data/website/www/source/stylesheets/_variables.less +39 -0
- data/website/www/source/stylesheets/bootstrap.css +5946 -0
- data/website/www/source/stylesheets/vagrantup.less +17 -0
- data/website/www/source/support.html.erb +25 -0
- data/website/www/source/support/community.html.erb +28 -0
- data/website/www/source/support/professional.html.erb +17 -0
- data/website/www/source/vmware/eula.html.md +21 -0
- data/website/www/source/vmware/index.html.erb +185 -0
- data/website/www/source/vmware/privacy-policy.html.md +71 -0
- data/website/www/source/vmware/terms-of-service.html.md +50 -0
- metadata +436 -186
@@ -1,4 +1,5 @@
|
|
1
1
|
require "log4r"
|
2
|
+
require "timeout"
|
2
3
|
|
3
4
|
module Vagrant
|
4
5
|
module Action
|
@@ -52,11 +53,14 @@ module Vagrant
|
|
52
53
|
end
|
53
54
|
|
54
55
|
@logger.debug("Waiting for target graceful halt state: #{@target_state}")
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
begin
|
57
|
+
Timeout.timeout(env[:machine].config.vm.graceful_halt_timeout) do
|
58
|
+
while env[:machine].state.id != @target_state
|
59
|
+
sleep 1
|
60
|
+
end
|
61
|
+
end
|
62
|
+
rescue Timeout::Error
|
63
|
+
# Don't worry about it, we catch the case later.
|
60
64
|
end
|
61
65
|
|
62
66
|
# The result of this matters on whether we reached our
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require "thread"
|
2
2
|
|
3
|
+
require "log4r"
|
4
|
+
|
3
5
|
module Vagrant
|
4
6
|
module Action
|
5
7
|
module Builtin
|
@@ -13,9 +15,16 @@ module Vagrant
|
|
13
15
|
|
14
16
|
def initialize(app, env)
|
15
17
|
@app = app
|
18
|
+
@logger = Log4r::Logger.new("vagrant::action::builtin::handle_box_url")
|
16
19
|
end
|
17
20
|
|
18
21
|
def call(env)
|
22
|
+
if !env[:machine].config.vm.box || !env[:machine].config.vm.box_url
|
23
|
+
@logger.info("Skipping HandleBoxUrl because box or box_url not set.")
|
24
|
+
@app.call(env)
|
25
|
+
return
|
26
|
+
end
|
27
|
+
|
19
28
|
if !env[:machine].box
|
20
29
|
# Get a "big lock" to make sure that our more fine grained
|
21
30
|
# lock access is thread safe.
|
@@ -29,18 +38,17 @@ module Vagrant
|
|
29
38
|
# raise a terrible runtime error.
|
30
39
|
box_name = env[:machine].config.vm.box
|
31
40
|
box_url = env[:machine].config.vm.box_url
|
41
|
+
box_download_insecure = env[:machine].config.vm.box_download_insecure
|
32
42
|
|
33
43
|
lock.synchronize do
|
34
44
|
# First see if we actually have the box now.
|
35
45
|
has_box = false
|
36
46
|
|
37
|
-
|
47
|
+
box_formats = env[:machine].provider_options[:box_format] ||
|
38
48
|
env[:machine].provider_name
|
39
|
-
[
|
40
|
-
|
41
|
-
|
42
|
-
break
|
43
|
-
end
|
49
|
+
if env[:box_collection].find(box_name, box_formats)
|
50
|
+
has_box = true
|
51
|
+
break
|
44
52
|
end
|
45
53
|
|
46
54
|
if !has_box
|
@@ -53,8 +61,9 @@ module Vagrant
|
|
53
61
|
|
54
62
|
begin
|
55
63
|
env[:action_runner].run(Vagrant::Action.action_box_add, {
|
64
|
+
:box_download_insecure => box_download_insecure,
|
56
65
|
:box_name => box_name,
|
57
|
-
:box_provider =>
|
66
|
+
:box_provider => box_formats,
|
58
67
|
:box_url => box_url
|
59
68
|
})
|
60
69
|
rescue Errors::BoxAlreadyExists
|
@@ -70,7 +70,7 @@ module Vagrant
|
|
70
70
|
|
71
71
|
# If the port is open (listening for TCP connections)
|
72
72
|
if extra_in_use.include?(host_port) || is_port_open?("127.0.0.1", host_port)
|
73
|
-
if !repair
|
73
|
+
if !repair || !options[:auto_correct]
|
74
74
|
raise Errors::ForwardPortCollision,
|
75
75
|
:guest_port => guest_port.to_s,
|
76
76
|
:host_port => host_port.to_s
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Vagrant
|
2
|
+
module Action
|
3
|
+
module Builtin
|
4
|
+
module MixinProvisioners
|
5
|
+
# This returns all the instances of the configured provisioners.
|
6
|
+
# This is safe to call multiple times since it will cache the results.
|
7
|
+
#
|
8
|
+
# @return [Array<Provisioner>]
|
9
|
+
def provisioner_instances
|
10
|
+
return @_provisioner_instances if @_provisioner_instances
|
11
|
+
|
12
|
+
# Make the mapping that'll keep track of provisioner => type
|
13
|
+
@_provisioner_types = {}
|
14
|
+
|
15
|
+
# Get all the configured provisioners
|
16
|
+
@_provisioner_instances = @env[:machine].config.vm.provisioners.map do |provisioner|
|
17
|
+
# Instantiate the provisioner
|
18
|
+
klass = Vagrant.plugin("2").manager.provisioners[provisioner.name]
|
19
|
+
result = klass.new(@env[:machine], provisioner.config)
|
20
|
+
|
21
|
+
# Store in the type map so that --provision-with works properly
|
22
|
+
@_provisioner_types[result] = provisioner.name
|
23
|
+
|
24
|
+
# Return the result
|
25
|
+
result
|
26
|
+
end
|
27
|
+
|
28
|
+
return @_provisioner_instances
|
29
|
+
end
|
30
|
+
|
31
|
+
# This will return a mapping of a provisioner instance to its
|
32
|
+
# type.
|
33
|
+
def provisioner_type_map
|
34
|
+
# Call this in order to initial the map if it hasn't been already
|
35
|
+
provisioner_instances
|
36
|
+
|
37
|
+
# Return the type map
|
38
|
+
@_provisioner_types
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -1,9 +1,11 @@
|
|
1
|
-
require 'digest/md5'
|
2
1
|
require 'fileutils'
|
3
2
|
require 'pathname'
|
3
|
+
require 'zlib'
|
4
4
|
|
5
5
|
require "log4r"
|
6
6
|
|
7
|
+
require 'vagrant/util/platform'
|
8
|
+
|
7
9
|
module Vagrant
|
8
10
|
module Action
|
9
11
|
module Builtin
|
@@ -37,7 +39,8 @@ module Vagrant
|
|
37
39
|
|
38
40
|
# Expand the host path, create it if we have to and
|
39
41
|
# store away the folder.
|
40
|
-
hostpath = Pathname.new(opts[:hostpath]).
|
42
|
+
hostpath = Pathname.new(opts[:hostpath]).
|
43
|
+
expand_path(env[:root_path])
|
41
44
|
|
42
45
|
if !hostpath.directory? && opts[:create]
|
43
46
|
# Host path doesn't exist, so let's create it.
|
@@ -51,6 +54,12 @@ module Vagrant
|
|
51
54
|
end
|
52
55
|
end
|
53
56
|
|
57
|
+
# Determine the real path by expanding symlinks and getting
|
58
|
+
# proper casing. We have to do this after creating it
|
59
|
+
# if it doesn't exist.
|
60
|
+
hostpath = hostpath.realpath
|
61
|
+
hostpath = Util::Platform.fs_real_path(hostpath)
|
62
|
+
|
54
63
|
# Set the hostpath back on the options and save it
|
55
64
|
opts[:hostpath] = hostpath.to_s
|
56
65
|
folders[id] = opts
|
@@ -60,13 +69,16 @@ module Vagrant
|
|
60
69
|
raise Errors::NFSNoHostIP if !env[:nfs_host_ip]
|
61
70
|
raise Errors::NFSNoGuestIP if !env[:nfs_machine_ip]
|
62
71
|
|
72
|
+
machine_ip = env[:nfs_machine_ip]
|
73
|
+
machine_ip = [machine_ip] if !machine_ip.is_a?(Array)
|
74
|
+
|
63
75
|
# Prepare the folder, this means setting up various options
|
64
76
|
# and such on the folder itself.
|
65
77
|
folders.each { |id, opts| prepare_folder(opts) }
|
66
78
|
|
67
79
|
# Export the folders
|
68
80
|
env[:ui].info I18n.t("vagrant.actions.vm.nfs.exporting")
|
69
|
-
env[:host].nfs_export(env[:machine].id,
|
81
|
+
env[:host].nfs_export(env[:machine].id, machine_ip, folders)
|
70
82
|
|
71
83
|
# Mount
|
72
84
|
env[:ui].info I18n.t("vagrant.actions.vm.nfs.mounting")
|
@@ -90,11 +102,9 @@ module Vagrant
|
|
90
102
|
opts[:map_gid] = prepare_permission(:gid, opts)
|
91
103
|
opts[:nfs_version] ||= 3
|
92
104
|
|
93
|
-
#
|
94
|
-
#
|
95
|
-
|
96
|
-
# the same host path will hash to the same fsid.
|
97
|
-
opts[:uuid] = Digest::MD5.hexdigest(opts[:hostpath])
|
105
|
+
# We use a CRC32 to generate a 32-bit checksum so that the
|
106
|
+
# fsid is compatible with both old and new kernels.
|
107
|
+
opts[:uuid] = Zlib.crc32(opts[:hostpath]).to_s
|
98
108
|
end
|
99
109
|
|
100
110
|
# Prepares the UID/GID settings for a single folder.
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require "log4r"
|
2
2
|
|
3
|
+
require_relative "mixin_provisioners"
|
4
|
+
|
3
5
|
module Vagrant
|
4
6
|
module Action
|
5
7
|
module Builtin
|
@@ -10,34 +12,41 @@ module Vagrant
|
|
10
12
|
# can do some setup, and then run again (on the return path) against
|
11
13
|
# a running machine.
|
12
14
|
class Provision
|
15
|
+
include MixinProvisioners
|
16
|
+
|
13
17
|
def initialize(app, env)
|
14
|
-
@app
|
15
|
-
@logger
|
18
|
+
@app = app
|
19
|
+
@logger = Log4r::Logger.new("vagrant::action::builtin::provision")
|
16
20
|
end
|
17
21
|
|
18
22
|
def call(env)
|
23
|
+
@env = env
|
24
|
+
|
19
25
|
# Check if we're even provisioning things.
|
20
26
|
enabled = true
|
21
|
-
enabled = env[:provision_enabled] if env.has_key?(:provision_enabled)
|
22
|
-
|
23
|
-
# This keeps track of a mapping between provisioner and type
|
24
|
-
type_map = {}
|
25
27
|
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
28
|
+
# Check if we already provisioned, and if so, disable the rest
|
29
|
+
ignore_sentinel = true
|
30
|
+
ignore_sentinel = env[:provision_ignore_sentinel] if env.has_key?(:provision_ignore_sentinel)
|
31
|
+
if !ignore_sentinel
|
32
|
+
@logger.info("Checking provisioner sentinel if we should run...")
|
33
|
+
sentinel = env[:machine].data_dir.join("action_provision")
|
34
|
+
if sentinel.file?
|
35
|
+
@logger.info("Sentinel found! Not provisioning.")
|
36
|
+
enabled = false
|
37
|
+
else
|
38
|
+
@logger.info("Sentinel not found.")
|
39
|
+
sentinel.open("w") do |f|
|
40
|
+
f.write(Time.now.to_i.to_s)
|
41
|
+
end
|
42
|
+
end
|
37
43
|
end
|
38
44
|
|
45
|
+
# If we explicitly specified, take that value.
|
46
|
+
enabled = env[:provision_enabled] if env.has_key?(:provision_enabled)
|
47
|
+
|
39
48
|
# Ask the provisioners to modify the configuration if needed
|
40
|
-
|
49
|
+
provisioner_instances.each do |p|
|
41
50
|
p.configure(env[:machine].config)
|
42
51
|
end
|
43
52
|
|
@@ -46,11 +55,11 @@ module Vagrant
|
|
46
55
|
|
47
56
|
# Actually provision if we enabled it
|
48
57
|
if enabled
|
49
|
-
|
58
|
+
provisioner_instances.each do |p|
|
50
59
|
next if env[:provision_types] && \
|
51
|
-
!env[:provision_types].include?(
|
60
|
+
!env[:provision_types].include?(provisioner_type_map[p])
|
52
61
|
|
53
|
-
run_provisioner(env,
|
62
|
+
run_provisioner(env, provisioner_type_map[p].to_s, p)
|
54
63
|
end
|
55
64
|
end
|
56
65
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require "log4r"
|
2
|
+
|
3
|
+
require_relative "mixin_provisioners"
|
4
|
+
|
5
|
+
module Vagrant
|
6
|
+
module Action
|
7
|
+
module Builtin
|
8
|
+
# This action will run the cleanup methods on provisioners and should
|
9
|
+
# be used as part of any Destroy action.
|
10
|
+
class ProvisionerCleanup
|
11
|
+
include MixinProvisioners
|
12
|
+
|
13
|
+
def initialize(app, env)
|
14
|
+
@app = app
|
15
|
+
@logger = Log4r::Logger.new("vagrant::action::builtin::provision_cleanup")
|
16
|
+
end
|
17
|
+
|
18
|
+
def call(env)
|
19
|
+
@env = env
|
20
|
+
|
21
|
+
# Ask the provisioners to modify the configuration if needed
|
22
|
+
provisioner_instances.each do |p|
|
23
|
+
env[:ui].info(I18n.t(
|
24
|
+
"vagrant.provisioner_cleanup",
|
25
|
+
name: provisioner_type_map[p].to_s))
|
26
|
+
p.cleanup
|
27
|
+
end
|
28
|
+
|
29
|
+
# Continue, we need the VM to be booted.
|
30
|
+
@app.call(env)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module Vagrant
|
2
|
+
module Action
|
3
|
+
module Builtin
|
4
|
+
# This waits for the communicator to be ready for a set amount of
|
5
|
+
# time.
|
6
|
+
class WaitForCommunicator
|
7
|
+
def initialize(app, env, states=nil)
|
8
|
+
@app = app
|
9
|
+
@states = states
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(env)
|
13
|
+
# Wait for ready in a thread so that we can continually check
|
14
|
+
# for interrupts.
|
15
|
+
ready_thr = Thread.new do
|
16
|
+
Thread.current[:result] = env[:machine].communicate.wait_for_ready(
|
17
|
+
env[:machine].config.vm.boot_timeout)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Start a thread that verifies the VM stays in a good state.
|
21
|
+
states_thr = Thread.new do
|
22
|
+
Thread.current[:result] = true
|
23
|
+
|
24
|
+
# If we aren't caring about states, just basically put this
|
25
|
+
# thread to sleep because it'll get killed later.
|
26
|
+
if !@states
|
27
|
+
while true
|
28
|
+
sleep 300
|
29
|
+
end
|
30
|
+
|
31
|
+
next
|
32
|
+
end
|
33
|
+
|
34
|
+
# Otherwise, periodically verify the VM isn't in a bad state.
|
35
|
+
while true
|
36
|
+
state = env[:machine].provider.state.id
|
37
|
+
|
38
|
+
# Used to report invalid states
|
39
|
+
Thread.current[:last_known_state] = state
|
40
|
+
|
41
|
+
# Check if we have the proper state so we can break out
|
42
|
+
if !@states.include?(state)
|
43
|
+
Thread.current[:result] = false
|
44
|
+
break
|
45
|
+
end
|
46
|
+
|
47
|
+
# Sleep a bit so we don't hit 100% CPU constantly.
|
48
|
+
sleep 1
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Wait for a result or an interrupt
|
53
|
+
env[:ui].info I18n.t("vagrant.boot_waiting")
|
54
|
+
while ready_thr.alive? && states_thr.alive?
|
55
|
+
return if env[:interrupted]
|
56
|
+
end
|
57
|
+
|
58
|
+
# If it went into a bad state, then raise an error
|
59
|
+
if !states_thr[:result]
|
60
|
+
raise Errors::VMBootBadState,
|
61
|
+
valid: @states.join(", "),
|
62
|
+
invalid: states_thr[:last_known_state]
|
63
|
+
end
|
64
|
+
|
65
|
+
# If it didn't boot, raise an error
|
66
|
+
if !ready_thr[:result]
|
67
|
+
raise Errors::VMBootTimeout
|
68
|
+
end
|
69
|
+
|
70
|
+
env[:ui].info I18n.t("vagrant.boot_completed")
|
71
|
+
|
72
|
+
# Make sure our threads are all killed
|
73
|
+
ready_thr.kill
|
74
|
+
states_thr.kill
|
75
|
+
|
76
|
+
@app.call(env)
|
77
|
+
ensure
|
78
|
+
ready_thr.kill
|
79
|
+
states_thr.kill
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -30,9 +30,10 @@ module Vagrant
|
|
30
30
|
# of "recoverable" middlewares in case something goes wrong!
|
31
31
|
raise Errors::VagrantInterrupt if env[:interrupted]
|
32
32
|
action = @actions.shift
|
33
|
-
@logger.info("Calling action: #{action}")
|
33
|
+
@logger.info("Calling IN action: #{action}")
|
34
34
|
@stack.unshift(action).first.call(env)
|
35
35
|
raise Errors::VagrantInterrupt if env[:interrupted]
|
36
|
+
@logger.info("Calling OUT action: #{action}")
|
36
37
|
rescue SystemExit
|
37
38
|
# This means that an "exit" or "abort" was called. In these cases,
|
38
39
|
# we just exit immediately.
|
@@ -70,31 +70,35 @@ module Vagrant
|
|
70
70
|
# the box represents will be added.
|
71
71
|
# @param [Boolean] force If true, any existing box with the same name
|
72
72
|
# and provider will be replaced.
|
73
|
-
def add(path, name,
|
73
|
+
def add(path, name, formats=nil, force=false)
|
74
|
+
formats = [formats] if formats && !formats.is_a?(Array)
|
75
|
+
provider = nil
|
76
|
+
|
74
77
|
with_collection_lock do
|
75
78
|
# A helper to check if a box exists. We store this in a variable
|
76
79
|
# since we call it multiple times.
|
77
|
-
check_box_exists = lambda do |
|
78
|
-
box = find(name,
|
80
|
+
check_box_exists = lambda do |box_formats|
|
81
|
+
box = find(name, box_formats)
|
79
82
|
next if !box
|
80
83
|
|
81
84
|
if !force
|
82
|
-
@logger.error("Box already exists, can't add: #{name} #{
|
83
|
-
raise Errors::BoxAlreadyExists, :name => name, :
|
85
|
+
@logger.error("Box already exists, can't add: #{name} #{box_formats.join(", ")}")
|
86
|
+
raise Errors::BoxAlreadyExists, :name => name, :formats => box_formats.join(", ")
|
84
87
|
end
|
85
88
|
|
86
89
|
# We're forcing, so just delete the old box
|
87
|
-
@logger.info(
|
90
|
+
@logger.info(
|
91
|
+
"Box already exists, but forcing so removing: #{name} #{box_formats.join(", ")}")
|
88
92
|
box.destroy!
|
89
93
|
end
|
90
94
|
|
91
|
-
log_provider =
|
95
|
+
log_provider = formats ? formats.join(", ") : "any provider"
|
92
96
|
@logger.debug("Adding box: #{name} (#{log_provider}) from #{path}")
|
93
97
|
|
94
98
|
# Verify the box doesn't exist early if we're given a provider. This
|
95
99
|
# can potentially speed things up considerably since we don't need
|
96
100
|
# to unpack any files.
|
97
|
-
check_box_exists.call(
|
101
|
+
check_box_exists.call(formats) if formats
|
98
102
|
|
99
103
|
# Verify that a V1 box doesn't exist. If it does, then we signal
|
100
104
|
# to the user that we need an upgrade.
|
@@ -121,26 +125,35 @@ module Vagrant
|
|
121
125
|
with_temp_dir(temp_dir) do |final_temp_dir|
|
122
126
|
# Get an instance of the box we just added before it is finalized
|
123
127
|
# in the system so we can inspect and use its metadata.
|
124
|
-
box = Box.new(name,
|
128
|
+
box = Box.new(name, nil, final_temp_dir)
|
125
129
|
|
126
130
|
# Get the provider, since we'll need that to at the least add it
|
127
131
|
# to the system or check that it matches what is given to us.
|
128
132
|
box_provider = box.metadata["provider"]
|
129
133
|
|
130
|
-
if
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
134
|
+
if formats
|
135
|
+
found = false
|
136
|
+
formats.each do |format|
|
137
|
+
# Verify that the given provider matches what the box has.
|
138
|
+
if box_provider.to_sym == format.to_sym
|
139
|
+
found = true
|
140
|
+
break
|
141
|
+
end
|
135
142
|
end
|
136
|
-
else
|
137
|
-
# We weren't given a provider, so store this one.
|
138
|
-
provider = box_provider.to_sym
|
139
143
|
|
144
|
+
if !found
|
145
|
+
@logger.error("Added box provider doesnt match expected: #{log_provider}")
|
146
|
+
raise Errors::BoxProviderDoesntMatch,
|
147
|
+
:expected => log_provider, :actual => box_provider
|
148
|
+
end
|
149
|
+
else
|
140
150
|
# Verify the box doesn't already exist
|
141
|
-
check_box_exists.call(
|
151
|
+
check_box_exists.call([box_provider])
|
142
152
|
end
|
143
153
|
|
154
|
+
# We weren't given a provider, so store this one.
|
155
|
+
provider = box_provider.to_sym
|
156
|
+
|
144
157
|
# Create the directory for this box, not including the provider
|
145
158
|
box_dir = @directory.join(name)
|
146
159
|
box_dir.mkpath
|
@@ -220,39 +233,43 @@ module Vagrant
|
|
220
233
|
# Find a box in the collection with the given name and provider.
|
221
234
|
#
|
222
235
|
# @param [String] name Name of the box (logical name).
|
223
|
-
# @
|
236
|
+
# @param [String] provider Provider that the box implements.
|
224
237
|
# @return [Box] The box found, or `nil` if not found.
|
225
|
-
def find(name,
|
238
|
+
def find(name, providers)
|
239
|
+
providers = [providers].flatten
|
240
|
+
|
226
241
|
with_collection_lock do
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
242
|
+
providers.each do |provider|
|
243
|
+
# First look directly for the box we're asking for.
|
244
|
+
box_directory = @directory.join(name, provider.to_s, "metadata.json")
|
245
|
+
@logger.info("Searching for box: #{name} (#{provider}) in #{box_directory}")
|
246
|
+
if box_directory.file?
|
247
|
+
@logger.info("Box found: #{name} (#{provider})")
|
248
|
+
return Box.new(name, provider, box_directory.dirname)
|
249
|
+
end
|
234
250
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
251
|
+
# If we're looking for a VirtualBox box, then we check if there is
|
252
|
+
# a V1 box.
|
253
|
+
if provider.to_sym == :virtualbox
|
254
|
+
# Check if a V1 version of this box exists, and if so, raise an
|
255
|
+
# exception notifying the caller that the box exists but needs
|
256
|
+
# to be upgraded. We don't do the upgrade here because it can be
|
257
|
+
# a fairly intensive activity and don't want to immediately degrade
|
258
|
+
# user performance on a find.
|
259
|
+
#
|
260
|
+
# To determine if it is a V1 box we just do a simple heuristic
|
261
|
+
# based approach.
|
262
|
+
@logger.info("Searching for V1 box: #{name}")
|
263
|
+
if v1_box?(@directory.join(name))
|
264
|
+
@logger.warn("V1 box found: #{name}")
|
265
|
+
raise Errors::BoxUpgradeRequired, :name => name
|
266
|
+
end
|
250
267
|
end
|
251
268
|
end
|
252
269
|
end
|
253
270
|
|
254
271
|
# Didn't find it, return nil
|
255
|
-
@logger.info("Box not found: #{name} (#{
|
272
|
+
@logger.info("Box not found: #{name} (#{providers.join(", ")})")
|
256
273
|
nil
|
257
274
|
end
|
258
275
|
|
@@ -261,6 +278,7 @@ module Vagrant
|
|
261
278
|
# If the given box is found but is not a V1 box then `true` is returned
|
262
279
|
# because this just works fine.
|
263
280
|
#
|
281
|
+
# @param [String] name Name of the box (logical name).
|
264
282
|
# @return [Boolean] `true` otherwise an exception is raised.
|
265
283
|
def upgrade(name)
|
266
284
|
with_collection_lock do
|
@@ -268,7 +286,7 @@ module Vagrant
|
|
268
286
|
box_dir = @directory.join(name)
|
269
287
|
|
270
288
|
# If the box doesn't exist at all, raise an exception
|
271
|
-
raise Errors::BoxNotFound, :name => name if !box_dir.directory?
|
289
|
+
raise Errors::BoxNotFound, :name => name, :provider => "virtualbox" if !box_dir.directory?
|
272
290
|
|
273
291
|
if v1_box?(box_dir)
|
274
292
|
@logger.debug("V1 box #{name} found. Upgrading!")
|