salt icon indicating copy to clipboard operation
salt copied to clipboard

2015.5.3 master_type: str causes minion to fail to start

Open twangboy opened this issue 11 years ago • 10 comments

Doesn't seem to be OS Specific. Verified on the following OS's: Windows 2012R264 Ubuntu 14.04

To reproduce: Install salt-minion 2015.5.3 Make sure master_type is set to str Try to start the minion It will fail with the following in the debug:

salt-minion -l debug
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG   ] Configuration file path: /etc/salt/minion
[INFO    ] Setting up the Salt Minion "test_cent_minion_install"
[DEBUG   ] Created pidfile: /var/run/salt-minion.pid
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[ERROR   ] Invalid keyword 'str' for variable 'master_type'
[INFO    ] The salt minion is shut down

Previous versions of the minion work just fine with this setting, in fact it appears to be the default.

If you delete the entry from the minion conf and let it choose a default, it actually starts successfully. It shows master_type as standard as shown by the config.option master_type command.

This problem was discovered while trying to spin up a Windows VM on EC2 and push a minion to it. It all installed successfully but failed to start. The reason it failed to start is because salt-cloud pushes out a default configuration that includes this setting.

twangboy avatar Jul 10 '15 21:07 twangboy

This is fixed by #25703 and #25704.

cachedout avatar Jul 24 '15 21:07 cachedout

Just ran into this issue with 2015.5.5 and 2015.8 - again. WTF?

kitplummer avatar Sep 29 '15 17:09 kitplummer

+1

Trying to deploy a master via salt-cloud and this is preventing successful deployment.

salt-cloud 2015.5.5 (Lithium)

2015-10-27 20:53:59,198 [salt.minion ][ERROR ][13227] Invalid keyword 'str' for variable 'master_type' 2015-10-27 20:53:59,198 [salt.cli.daemons ][INFO ][13227] The salt minion is shut down

ghost avatar Oct 28 '15 01:10 ghost

Solution is to set the following minion setting in your provider configuration. This overrides the invalid configuration setting that salt-cloud seems to be generating.

minion:
  master_type: standard

ghost avatar Oct 28 '15 01:10 ghost

still around indeed, thanks @mshirley for the "fix" info

mcansky avatar Oct 29 '15 21:10 mcansky

It looks like you need to change it to str, not standard in newer versions of salt.

twangboy avatar Oct 30 '15 14:10 twangboy

For me, this seems to be related to Ubuntu 14.04 LTS and the version of salt-minion being deployed on the new node by salt-bootstrap.

I am deploying from CentOS 6 using salt-cloud 2015.5.5-1.el6 from EPEL. I'm creating a Digital Ocean droplet using Ubuntu 14.04.3 LTS x64.

The first thing I had to do was add -P to my script_args to allow for a pip installation of packages.

Then, when salt-bootstrap executes on the remote node it adds the saltstack apt repo and installs packages from it.

deb http://ppa.launchpad.net/saltstack/salt/ubuntu trusty main

When we look at this repo we see that the latest version of salt in this repo is 2015.5.3.

http://ppa.launchpad.net/saltstack/salt/ubuntu/pool/main/s/salt/

2015.5.3 does not support master_type: str, only standard.

So, in closing, you have a few options.

  1. Don't deploy Ubuntu 14.04 nodes using salt-cloud :)
  2. If you need to deploy Ubuntu 14.04 nodes do one of the following 2a) Specify master_type: standard OR 2b) Specify a version of salt using script_args in your Ubuntu 14.04 profile (-P seems to be required as well on 14.04)
script_args: -P git v2015.5.5

In the end, all of this could also solved if someone would push newer salt packages to the repos. 14.04 LTS isn't going anywhere for awhile.

ghost avatar Oct 30 '15 20:10 ghost

I have a master running 2015.8.1, when I use salt-cloud, it install 2015.5.3 on minion using bootstrap, that's a bit odd, should not a 2015.8.1 master install a 2015.8.1 minion? The minion fails with:

[ERROR ] Invalid keyword 'str' for variable 'master_type'

So I guess my question is, how do I get 2015.8.1 master to install a 2015.8.1 minion using salt-cloud with bootstrap?

syedaali avatar Nov 04 '15 01:11 syedaali

As I mention in my previous comment you'll need to specify a salt version using the script_args option in your cloud profile. This will install a specific salt version from the git repo.

salt-bootstrap, by default, will install whatever version of salt that is available through the system package mananger of the minion you are provisioning if you don't override it with the script_args option. On older operating systems like ubuntu 14.04/5 LTS the latest version of salt in the offical ubuntu repositories is 2015.5.3 which is causing your problem.

ghost avatar Nov 04 '15 04:11 ghost

@mshirley thanks for the update and details

mcansky avatar Nov 10 '15 17:11 mcansky