Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap fails on Ubuntu 14.04 via Vagrant provisioner #648

Closed
syphernl opened this issue Aug 25, 2015 · 10 comments
Closed

Bootstrap fails on Ubuntu 14.04 via Vagrant provisioner #648

syphernl opened this issue Aug 25, 2015 · 10 comments

Comments

@syphernl
Copy link

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
@s0undt3ch
Copy link
Contributor

Have you tried starting the minion by hand on that vagrant box? What's on the minion's log file?

@syphernl
Copy link
Author

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"

@tehmaspc
Copy link

+1 on having this issue; sucky; breaks my vagrant/serverspec testing of salt; i'm sad :(

(going to try workaround)

@saltstack-bot
Copy link

Moved to saltstack/salt#26731.

@thenewwazoo
Copy link

This appears to be yet another regression of #370

@gravyboat
Copy link
Contributor

This error also happens to me with centos 6.6, same error.

@alexhayes
Copy link

Experienced this also, I needed to use the following (which requires Vagrant >= 1.7.4)

Vagrant.require_version ">= 1.7.4"

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  ...
  ...
  config.vm.provision :salt do |salt|
    ...
    ...
    salt.install_type = "stable"
    salt.install_command = '-P -F -c /tmp stable'
  end
end

@jfindlay
Copy link
Contributor

When #674 is merged, bootstrap should no longer need -P. I have tested this against ubuntu 12/14, CentOS 5/6/7 and FreeBSD 10. None of them needed -P.

@s0undt3ch
Copy link
Contributor

#674 was merged. Closing. Please re-open if necessary.

@tehmaspc
Copy link

thanks for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants