salt minion hangs when sign_in
https://github.com/saltstack/salt/issues/4199#issuecomment-37623714 I met the problem too. many minions works well, only one hangs, and minion hog cpu to 100%
After starting the salt minion, it auto scheduled mine.update, and the cpu went 100% I can avoid this by tuning multiprocessing to false, and everything works fine.
I straced minion, it was busy epoll_wait, which returned 1. " SaltReqTimeoutError: Waited 60 seconds" was logged, I thought it was throwed from sign_in
Tried publish command from the master, minion did excute the job, but nothing returned to master. tcpdump the 4506 port returns nothing
master and minion has the same version: Salt: 0.17.5 Python: 2.7.2 (default, Dec 26 2013, 13:19:58) Jinja2: 2.7.2 M2Crypto: 0.22 msgpack-python: 0.4.0 msgpack-pure: Not Installed pycrypto: 2.6.1 PyYAML: 3.10 PyZMQ: 14.0.1 ZMQ: 4.0.3
Only the one minion hangs? What OS is on that minion?
yes, only minion hangs. It is SuSE with customized kernel.
Very strange. For now, I would recommend turning off multiprocessing, as you mentioned before. We'll have to see if we can reproduce ourselves.
ok thanks. After I just designed a job control infrastructure, I found salt, It is just what I need. Salt is a great work.
and I think because salt used zmq, it must pull the result and it is not like a push server. if the minion keeps connecting with a push server, the job scheduler could immediately fail the unconnected minion job.
The minion stays connected to the master, and the master pushes jobs to the minion. The minion can also pull stuff from the master when it wants to, but most of salt is push-based.
For example, if minion A is down, I try to push a job to minion A, the master will return immediately or wait timeout?
The master will wait for the timeout. Currently the master doesn't keep much information on which minions are actually currently connected, it decides which minions exist based on accepted keys. So if you target minion_a, then the master will look for an accepted key for minion_a, find it, fire the job, and then wait for the return.
So if zmq provide the interface to query the connected minons, the master needn't to wait for the timeout.
The problem is that it's a pub-sub model. The master fires off the job to all connected minions, then waits for the minions it expects to return. It doesn't know who received the job.
We do now have presence events that allow us to see which minions are connected and which aren't. However, we do not currently store that information and have not yet incorporated it into the targeting system. It's on the list of things we want to do.
Nice! I prefer the master-minion works like the pushsvr( think about APNS push ), and deploying job works like RPC call.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.