Skip to content

VirtualBox provision process attempts to take over ports on host and fails if it cannot #21

Description

@denis-yuen

When attempting to provision with the following:

perl bin/launcher/launch_cluster.pl --use-virtualbox --working-dir target-vb-1 --vb-ram 12000 --vb-cores 2 --config-file vagrant_cluster_launch.json 

I got the following message and the VM failed to even power on

ALL LAUNCH THREADS STARTED
ALL LAUNCH THREADS COMPLETED
Was unable to get node infomation at /home/dyuen/Bindle/bin/launcher/../../lib/cluster/provision.pm line 193
cluster::provision::get_host_id_from_vagrant_status('Current machine states:\x{a}\x{a}master                    poweroff (...') called at /home/dyuen/Bindle/bin/launcher/../../lib/cluster/provision.pm line 179
cluster::provision::find_node_info('HASH(0x2830090)', 'Current machine states:\x{a}\x{a}master                    poweroff (...') called at /home/dyuen/Bindle/bin/launcher/../../lib/cluster/provision.pm line 56
cluster::provision::find_cluster_info('HASH(0x1d685c8)', 'target-vb-1') called at /home/dyuen/Bindle/bin/launcher/../../lib/cluster/provision.pm line 20
cluster::provision::provision_instances('cluster::provision', 'HASH(0x1d685e0)', 'HASH(0x1d685c8)', 'target-vb-1', 0, 0) called at bin/launcher/launch_cluster.pl line 157

The reason is I had to change this section of code in the Vagrantfile

--- a/templates/Vagrantfile_part.template
+++ b/templates/Vagrantfile_part.template
 @@ -81,15 +81,15 @@
        override.ssh.private_key_path = "%{VCLOUD_SSH_PEM_FILE}"
     end

-    %{custom_hostname}.vm.network :forwarded_port, host: 8081, guest: 80
-    %{custom_hostname}.vm.network :forwarded_port, host: 8080, guest: 8080
-    %{custom_hostname}.vm.network :forwarded_port, host: 8888, guest: 8888
-    %{custom_hostname}.vm.network :forwarded_port, host: 11000, guest: 11000
-    %{custom_hostname}.vm.network :forwarded_port, host: 50030, guest: 50030
-    %{custom_hostname}.vm.network :forwarded_port, host: 50070, guest: 50070
-    %{custom_hostname}.vm.network :forwarded_port, host: 60010, guest: 60010
-    %{custom_hostname}.vm.network :forwarded_port, host: 60030, guest: 60030
-    %{custom_hostname}.vm.network :forwarded_port, host: 5432, guest: 5432
     #%{custom_hostname}.vm.hostname = "%{custom_hostname}"
     %{custom_hostname}.vm.provision :shell, :path => "%    {custom_hostname}_os_server_setup.sh"
   end

Please make the following changes

  1. Ensure that we get a more decipherable error message
  2. Add a parameter to make taking over of host ports optional

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions