Bootstrap fails on Ubuntu 14.04 via Vagrant provisioner
Issue by saltstack-bot
Fri Aug 28 13:46:06 2015
Originally opened as https://github.com/saltstack/salt/issues/26731
Issue by syphernl
Tue Aug 25 12:21:15 2015
Originally opened as https://github.com/saltstack/salt-bootstrap/issues/648
With recent changes it is required to add the following to the Vagrantfile:
salt.install_args = "-P"
Pretty annoying to have this, since we have a large number of boxes and fresh installs are causing issues.
However, even with the -P flag it isn't properly provisioning either:
Setting up python-markupsafe (0.18-1build2) ...
Setting up python-jinja2 (2.7.2-2) ...
Setting up python-msgpack (0.3.0-1ubuntu3) ...
Setting up python-zmq (14.0.1-1build2) ...
Setting up salt-common (2015.5.3+ds-1trusty1) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Setting up salt-minion (2015.5.3+ds-1trusty1) ...
salt-minion start/running, process 6863
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for ureadahead (0.100.0-16) ...
* INFO: Running install_ubuntu_check_services()
* INFO: Running install_ubuntu_restart_daemons()
salt-minion start/running, process 6918
* INFO: Running daemons_running()
* ERROR: salt-minion was not found running
* ERROR: Failed to run daemons_running()!!!
* ERROR: salt-minion was not found running. Pass '-D' to bootstrap-salt.sh when bootstrapping for additional debugging information...
Stderr from the command:
stdin: is not a tty
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 204k 100 204k 0 0 375k 0 --:--:-- --:--:-- --:--:-- 376k
The second run of vagrant provision results in:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/tmp/bootstrap_salt.sh -C -P
Stdout from the command:
Stderr from the command:
stdin: is not a tty
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * ERROR: In order to run the script in configuration only mode you also need to provide the configuration directory.
23 204k 23 48522 0 0 157k 0 0:00:01 --:--:-- 0:00:01 157k
curl: (23) Failed writing body (630 != 16384)
Since we use Salt (with Vagrant) on a daily basis this is causing quite a bit of trouble.
This particular box uses the following Vagrantfile:
config.vm.provision :salt do |salt|
salt.minion_config = "dev/salt/minion"
salt.install_args = "-P"
salt.run_highstate = true
salt.colorize = true
salt.log_level = "info"
salt.verbose = true
end
Comment by saltstack-bot
Fri Aug 28 13:46:07 2015
Comment by s0undt3ch
Tue Aug 25 12:50:20 2015
Have you tried starting the minion by hand on that vagrant box? What's on the minion's log file?
Comment by saltstack-bot
Fri Aug 28 13:46:08 2015
Comment by syphernl
Tue Aug 25 13:00:23 2015
After a clean provision:
2015-08-25 12:55:45,390 [salt.crypt ][CRITICAL][6975] The Salt Master has rejected this minion's public key!
To repair this issue, delete the public key for this minion on the Salt Master and restart this minion.
Or restart the Salt Master in open mode to clean out the keys. The Salt Minion will now exit.
2015-08-25 12:55:55,727 [salt.crypt ][CRITICAL][7028] The Salt Master has rejected this minion's public key!
To repair this issue, delete the public key for this minion on the Salt Master and restart this minion.
Or restart the Salt Master in open mode to clean out the keys. The Salt Minion will now exit.
Since it is missing the configuration it is communicating with the production-master instead. Or at least trying to..
Perhaps this is more of a Salt-Vagrant provisioning issue rather than one for the Bootstrap although it was working fine before earlier and only started whenever the -P flag was introduced / required.
Having just the -P flag for salt.install_args doesn't just work. It also requires something I have found a workaround at the Vagrant issuetracker to make it work:
salt.bootstrap_options = "-F -c /tmp -P"
Comment by saltstack-bot
Fri Aug 28 13:46:09 2015
Comment by tehmaspc
Tue Aug 25 20:47:11 2015
+1 on having this issue; sucky; breaks my vagrant/serverspec testing of salt; i'm sad :(
(going to try workaround)