Repository navigation
Closed
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVECorerelates to code central or existential to SaltMulti-MasterP2Priority 2bugbroken, incorrect, or confusing behaviorseverity-high2nd top severity, seen by most users, causes major problems
Milestone
Description
In a single-master setup the minions will try to re-authenticate with the master until they succeed.
But in a multi-master setup we observe the following behavior when starting a minion process:
- if no masters are up, the minion fails to start
- if not all masters are up, the minion only authenticates with the masters which are up (if for instance you reboot an appliance which hosts both a salt-master and a salt-minion (in multi-master configuration), after reboot you'll notice the master on that appliance can't address its minion unless you wait a few seconds and restart the minion...)
I would expect the minions to behave the same in both situations. (They should try to re-authenticate with all configured masters.)
We use salt as follows:
- we have multiple loadbalanced frontend appliances, which each run a salt-master
- the frontend applications use the salt-master to execute states on the minions
Just to place this in context:
As the behavior currently stands we need to do the following to make sure everything works ok:
- we first test.ping all minions
- if some don't report back, we "normal ping" them
- if they are online, we try to "regular ssh" restart the minions on them
(if they aren't, we fail the command, refusing to execute states as long as not all our minions are up) - we then wait a bit, and retry the test.ping
- once all are reported up (well, authenticated really...), we can execute our states
We would expect only to need to do the first test.ping to make sure they are all up, and then either execute the states, or raise an error if not all were up.
Metadata
Metadata
Assignees
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVECorerelates to code central or existential to SaltMulti-MasterP2Priority 2bugbroken, incorrect, or confusing behaviorseverity-high2nd top severity, seen by most users, causes major problems
Activity
cachedout commentedon Oct 30, 2014
Hi @bernieke
Against which version of Salt are you observing the behaviour wherein if a minion is configured for MM, it will not start up if no masters can be reached? I have tested this against 2014.7rc6 this morning and I do not see that happening. Instead, I see a minion that's configured for multiple masters start up and wait until those masters come online and connecting to them when they do.
This MM code has had a fair amount of work done on it for 2014.7 so if you haven't tested your setup against one of the RCs, you may find that some (if not all) of your concerns have already been addressed.
bernieke commentedon Oct 30, 2014
I'm also on 2014.7.0rc6
I've just checked again, since the last time I tried this I wasn't on rc6 yet, but the behavior I described is still there.
What I'm doing (on both appliances simultaneously):
The ps will show salt-minion having died.
This is the minion log:
My master config:
And minion config:
I'm on ubuntu 14.04
bernieke commentedon Oct 30, 2014
Note that I've updated the comment above with the correct test script.
rallytime commentedon Oct 30, 2014
@bernieke - I am able to reproduce this error. We'll get this fixed up!
cachedout commentedon Oct 30, 2014
The problem was that I wasn't waiting long enough to see the timeout. You
are correct. We'll fix this. Thanks!
On Thu, Oct 30, 2014 at 2:00 PM, Nicole Thomas [email protected]
wrote:
foxx commentedon Nov 4, 2014
Also getting this same problem;
10 remaining items
vakulich commentedon Apr 13, 2015
Hello!
I was able to reproduce this issue with the latest HEAD from the 2014.7 branch.
If minion is configured with 2 saltmasters:
bernieke commentedon Apr 24, 2015
I've just tried this on 2014.7.5, and the problem still exists.
Both the behavior where minions fail to start when no masters are running, and the behavior where minions won't listen to a master which isn't up when the minion was first started.
rallytime commentedon Apr 24, 2015
Thanks for the updates. I am seeing the same thing. If all masters are up and running when the minion starts, and then later one of the masters goes down, I am seeing the minions reconnect. But you're right, if the master isn't up when the minion first starts and tries to connect, the behavior is still the same/broken.
charleshbaker commentedon May 12, 2015
Having this issue on 2014.7.1. Tried restarting the masters and restarting the minion. Same error. Any recommended workarounds?
[root@ip-xx-yy-zz-aa salt]# salt-minion -l debug
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/masters.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/masters.conf
[DEBUG ] Including configuration from '/etc/salt/minion.d/startup.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/startup.conf
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: i-wwxxyyzz
[DEBUG ] Configuration file path: /etc/salt/minion
[INFO ] Setting up the Salt Minion "i-wwxxyyzz"
[DEBUG ] Created pidfile: /var/run/salt-minion.pid
[DEBUG ] MultiMinion PUB socket URI: ipc:///var/run/salt/minion/minion_event_6ce01a1300_pub.ipc
[DEBUG ] MultiMinion PULL socket URI: ipc:///var/run/salt/minion/minion_event_6ce01a1300_pull.ipc
[INFO ] Starting pub socket on ipc:///var/run/salt/minion/minion_event_6ce01a1300_pub.ipc
[INFO ] Starting pull socket on ipc:///var/run/salt/minion/minion_event_6ce01a1300_pull.ipc
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/masters.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/masters.conf
[DEBUG ] Including configuration from '/etc/salt/minion.d/startup.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/startup.conf
[DEBUG ] Attempting to authenticate with the Salt Master at xx.yy.zz.aa
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[ERROR ] Error while bringing up minion for multi-master. Is master at xx.yy.zz.aa responding?
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/masters.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/masters.conf
[DEBUG ] Including configuration from '/etc/salt/minion.d/startup.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/startup.conf
[DEBUG ] Attempting to authenticate with the Salt Master at yy.zz.aa.bb
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[ERROR ] Error while bringing up minion for multi-master. Is master at yy.zz.aa.bb responding?
[ERROR ] Error while bringing up minion for multi-master. All configured masters [xx.yy.zz.aa, yy.zz.aa.bb] are not responding!!!
[ERROR ] Error while bringing up minion for multi-master. All configured masters [xx.yy.zz.aa, yy.zz.aa.bb] are not responding!!!
DaveQB commentedon May 15, 2015
Just adding our update on this.
We've just upgraded to 2014.7.5 and found about 50% of our minions "disappeared" much like the result of upgrading to 2014.7.1
I've created an ssh script to loop through all the minion machines and restart salt (glad AWS allows easy look up of all servers IP addresses).
rallytime commentedon May 21, 2015
I have just tested this on a soon-to-be released/potential 2015.5.1. It would appear that most of the original bugs/concerns are fixed. However, some of the things that are fixed are traded for another problem in a new bug, #21744. I wanted to take a moment to explain the differences in behavior that I am seeing from the 2014.7 releases to the 2015.5 releases in my testing.
Basically what I am seeing (on 2015.5.1) is this:
Expected (and Good) Behavior:
Improvements in Minion Re-Authenticating with Master:
Caveat/Problems because of #21744:
bernieke commentedon Jun 12, 2015
I've noticed that adding "auth_safemode: true" to the minion config gets 2014.7.0 the same behavior as 2015 currently has per ticket #21744
As described in that ticket I've gone and hacked up a fix for us (on top of 2014.7.0), which combined with auth_safemode gives us the behavior we need. (Masters and minions can now start/restart with any of them running/stopped, and everything just works the way you would expect.)
I've set auth_timeout and random_reauth_delay to 15 seconds, and auth_tries to 1. This, combined with a 120 second timeout in the master config, makes it so any call executed will actually come through on any running minion, even if it needs to reauthenticate. (I've tried using ping_interval to avoid this problem, but that didn't do anything for me. Possibly another multimaster bug?)
bernieke commentedon Aug 11, 2015
Seems these problems are all fixed in 2015.8, thanks to the rewrite using tornado.