-
Notifications
You must be signed in to change notification settings - Fork 80
Vagrant Box "UP" fails at "puppet" installation #204
Description
Hi all,
during the vagrant up process the connection to puppet failed and thus the complete initalisation of the vagrant box did not run correctly. I ran the command for the standalone system.
Unfortunately I no longer have the error in my cmd. The error message stated that a connection could not be established to the downloadable ".rpm" puppet file.
Normally puppet should be downloaded and installed as it is a prequisite to execute the following steps.
Failing the download doesn't abort the hole setup of the VM. A "ssh" connection issue is protocolled and information that further information can be retrieved from the logs... I did not find those logs.
With vagrant ssh a connection can be established to the newly created VM icinga2.
Neither Icinga nor it's required components are installed on the new virutal machine. (puppet does this)
I did notice that Icinga was not up and running but didn't know what triggered this.
I finally discovered that with the vagrant provision the setup of puppet could be restarted.
The vagrant file contains the following:
provision: Puppet and friends
provision_pre(node_config, name, options) provision_puppet(node_config, name, options) provision_post(node_config, name, options)
After running vagrant provision puppet was successfully installed. The following steps where also automatically triggered, which concluded in the correct setup of Icinga.
What I discribed above is a fix in case the setup fails.
Below an idea how this issue could be mitigated:
Within the setup the connection to puppet should be enclosed with a retry after a few seconds. Let's say the connection can't be established on first try. Wait 5 seconds and try again, if that didn't work try a last time after e.g. 10 more seconds...
Then either the installation of puppet has succeeded or the process should inform the user that due to the missing installation of puppet the box is not correctly setup and could be "fixed" with vagrant provision
My Environment
Vagrant version (vagrant -v): 2.2.7
Box name: icinga2
Operating system: WIN 10
Provider (VirtualBox, Parallels, libvirt): VirtualBox (OS Centos 7.7)