Search code examples
salt-project

Salt multi master: does it work with multiple masters offline


I am trying to run a multi-master setup in our dev environment. The idea is that every dev team has their own salt master. However, all minions in the entire dev environment should be able to receive salt commands from all salt master servers.

Since not every team needs their salt master 24/7, most of them are turned off for several days during the week.

I'm running 2016.11.4 on the masters, as well as on the minions. However, I run into the following problem: If one of the hosts that are listed in the mininons config file is shut down, the minion will not always report back on a 'test.ping' command (not even with -t 60)

My experience is, that the more master servers are offline, the longer the lag of the minion is to answer requests. Especially if you execute a 'test.ping' on MasterX while the minions' log is at this point:

2017-05-19 08:31:44,819 [salt.minion      ][DEBUG   ][5336] Connecting to master. Attempt 4 (infinite attempts)

If I trigger a 'test.ping' at this point, chances are 50/50 that I will get a 'minion did not return' on my master.

Obviously though, I always want a return to my 'test.ping', regardless from which master I send it.

Can anybody tell me if what I try is feasible with salt? Because all the articles about salt multi master setup that I could find would only say: 'put a list of master servers into the minion config and that's it!'


Solution

  • The comment from gtmanfred solved my question:

    That is not really the way multi master is meant to work. It is supposed to be used more for failover and not for separating out teams.