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

2015.5.3 master_type: str causes minion to fail to start #25335

Closed
twangboy opened this issue Jul 10, 2015 · 10 comments
Closed

2015.5.3 master_type: str causes minion to fail to start #25335

twangboy opened this issue Jul 10, 2015 · 10 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P1 Priority 1 Regression The issue is a bug that breaks functionality known to work in previous releases. severity-high 2nd top severity, seen by most users, causes major problems
Milestone

Comments

@twangboy
Copy link
Contributor

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 twangboy added Bug broken, incorrect, or confusing behavior Regression The issue is a bug that breaks functionality known to work in previous releases. Core relates to code central or existential to Salt severity-high 2nd top severity, seen by most users, causes major problems P1 Priority 1 labels Jul 10, 2015
@jfindlay jfindlay added this to the Approved milestone Jul 13, 2015
@cachedout
Copy link
Contributor

This is fixed by #25703 and #25704.

@kitplummer
Copy link

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

@mshirley
Copy link

+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

@mshirley
Copy link

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

@mcansky
Copy link

mcansky commented Oct 29, 2015

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

@twangboy
Copy link
Contributor Author

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

@mshirley
Copy link

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.

@syedaali
Copy link

syedaali commented Nov 4, 2015

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?

@mshirley
Copy link

mshirley commented Nov 4, 2015

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.

@mcansky
Copy link

mcansky commented Nov 10, 2015

@mshirley thanks for the update and details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P1 Priority 1 Regression The issue is a bug that breaks functionality known to work in previous releases. severity-high 2nd top severity, seen by most users, causes major problems
Projects
None yet
Development

No branches or pull requests

7 participants