Master failing to send jobs to Minions after saltutil.refresh_pillar
We've had a problem since upgrading to 2014.7.0 that after longer period of time of the minions being online they become non-responsive after sending them a saltutil.refresh_pillar. This is affecting about 70% of our minions. The good thing is that these minions are always the same on which ones return and which ones don't.
Here is how we can reproduce the issue:
-
Start up the master & minions, let them be running for several hours.
-
Perform a
salt \* saltutil.refresh_pillar -v- This runs fine and returns for all the minions. -
Perform a
salt \* test.ping -v- Only 30% of our minions will return this.
These minions will no longer respond to commands. What is even more crazy is the job id won't show up in the cache. The test.ping doesn't show up in the minion's log. I've reviewed the master's log and nothing stood out to me.
So I'm willing to try some other debugging methods and what not, just at a point where I need some help diagnosing what is going on.
/cc @UtahDave @whiteinge
Heya @JustinCarmony.
Could I see some debug logs for one of the affected minions from the point at which you send the refresh.pillar through the test.ping?
2014-12-02 10:15:47,688 [salt.config ][DEBUG ] Reading configuration from /etc/salt/minion
2014-12-02 10:15:48,017 [salt.crypt ][DEBUG ] Decrypting the current master AES key
2014-12-02 10:15:48,018 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:15:48,160 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:15:48,511 [salt.loader ][DEBUG ] LazyLoaded .returner
2014-12-02 10:15:48,679 [salt.crypt ][DEBUG ] Decrypting the current master AES key
2014-12-02 10:15:48,680 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:16:24,244 [salt.minion ][INFO ] User sudo_jcarmony Executing command test.ping with jid 20141202101641588041
2014-12-02 10:16:24,245 [salt.minion ][DEBUG ] Command details {'tgt_type': 'glob', 'jid': '20141202101641588041', 'tgt': '*', 'ret': '', 'user': 'sudo_jcarmony', 'arg': [], 'fun': 'test.ping'}
2014-12-02 10:16:24,253 [salt.minion ][INFO ] Starting a new job with PID 24217
2014-12-02 10:16:24,254 [salt.minion ][INFO ] Returning information for job: 20141202101641588041
2014-12-02 10:16:25,929 [salt.crypt ][DEBUG ] Decrypting the current master AES key
2014-12-02 10:16:25,930 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:16:33,113 [salt.minion ][INFO ] User sudo_jcarmony Executing command test.ping with jid 20141202101650457860
2014-12-02 10:16:33,114 [salt.minion ][DEBUG ] Command details {'tgt_type': 'glob', 'jid': '20141202101650457860', 'tgt': '*', 'ret': '', 'user': 'sudo_jcarmony', 'arg': [], 'fun': 'test.ping'}
2014-12-02 10:16:33,121 [salt.minion ][INFO ] Starting a new job with PID 24224
2014-12-02 10:16:33,123 [salt.minion ][INFO ] Returning information for job: 20141202101650457860
2014-12-02 10:16:33,966 [salt.crypt ][DEBUG ] Decrypting the current master AES key
2014-12-02 10:16:33,967 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:16:48,127 [salt.minion ][INFO ] User sudo_jcarmony Executing command saltutil.refresh_pillar with jid 20141202101705471323
2014-12-02 10:16:48,127 [salt.minion ][DEBUG ] Command details {'tgt_type': 'glob', 'jid': '20141202101705471323', 'tgt': '*', 'ret': '', 'user': 'sudo_jcarmony', 'arg': [], 'fun': 'saltutil.refresh_pillar'}
2014-12-02 10:16:48,135 [salt.minion ][INFO ] Starting a new job with PID 24231
2014-12-02 10:16:48,136 [salt.utils.event ][DEBUG ] SaltEvent PUB socket URI: ipc:///var/run/salt/minion/minion_event_8a51a31f6e_pub.ipc
2014-12-02 10:16:48,136 [salt.utils.event ][DEBUG ] SaltEvent PULL socket URI: ipc:///var/run/salt/minion/minion_event_8a51a31f6e_pull.ipc
2014-12-02 10:16:48,137 [salt.utils.event ][DEBUG ] Sending event - data = {'_stamp': '2014-12-02T10:16:48.137126'}
2014-12-02 10:16:48,138 [salt.minion ][DEBUG ] Handling event 'pillar_refresh||||||\x81\xa6_stamp\xba2014-12-02T10:16:48.137126'
2014-12-02 10:16:48,165 [salt.minion ][INFO ] Returning information for job: 20141202101705471323
2014-12-02 10:16:48,932 [salt.crypt ][DEBUG ] Decrypting the current master AES key
2014-12-02 10:16:48,932 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:16:51,333 [salt.crypt ][DEBUG ] Decrypting the current master AES key
2014-12-02 10:16:51,333 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:16:54,616 [salt.config ][DEBUG ] Reading configuration from /etc/salt/minion
2014-12-02 10:16:55,479 [salt.crypt ][DEBUG ] Decrypting the current master AES key
2014-12-02 10:16:55,479 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:16:55,718 [salt.crypt ][DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
2014-12-02 10:16:56,030 [salt.loader ][DEBUG ] LazyLoaded .returner
and then it would just loop the loading key stuff
So one thing we realized is our master was running on squeeze, but all the affected minions were wheezy. We've upgraded the master to wheezy and waiting to see if we still have the same problem or not.
Wow, that's interesting. Yeah, let's see what happens with the upgrade. Nice find.
On Tue, Dec 2, 2014 at 1:39 PM, Justin Carmony [email protected] wrote:
So one thing we realized is our master was running on squeeze, but all the affected minions were wheezy. We've upgraded the master to wheezy and waiting to see if we still have the same problem or not.
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/18648#issuecomment-65300303.
Sooooooo...... no luck. It happened again this morning.
I'm just wondering if my minions are pulling a different version of zmq. Is there a way I can validate which library they are using?
Each of the servers are completely updated, all on the same version of libzmq3 (which is 4.0.4, the custom build cro did for wheezy).
I've bumped into same issue. I have a mix setup of Ubuntu 12.04s and 14.04s, and I use Salt Stack PPA all around. "dpkg -l salt-minion" gives: 12.04: ii salt-minion 2014.7.1+ds-1precise1 14.04: ii salt-minion 2014.7.1+ds-1trusty1
Master is on 12.04, same series: $ dpkg -l salt-master ii salt-master 2014.7.1+ds-1precise1
Any help appreciated.
Edit: I tried reloading a running service in an affected 14.04 minion to see if it would help. It died instead: $ sudo service salt-minion status salt-minion start/running, process 32177 $ sudo service salt-minion reload $ sudo service salt-minion status salt-minion stop/waiting
After starting salt-minion service again, everything works.
I just updated pillars to 3 minions, 1 out of 3 failed to reply to test.ping after that. salt-minion 2014.7.1+ds-3precise1 in all.
Pillars updated to 6, only 2 reply after that. 2014.7.2+ds-1precise2 and 2014.7.2+ds-1trusty2 in the receiving end.
@JustinCarmony @mtapoja Is this with a single master or multi-master?
Mine is a single master setup.
Use at your own risk!. But in a mixed Ubuntu 12.04/14.04 this workaround seems to work: 1: make sure 'at' is installed for each machine: $ sudo salt -L list_of_minions pkg.install at 2: $ sudo salt -L list_of_minions cmd.run "echo 'service salt-minion restart'|at now + 3 minute" 3: $ sudo salt -L list_of_minions saltutil.refresh_pillar
For recurrent refreshing you only need to run 2 and 3.
You can also check the effects with the following commands:
Check salt-minion process id's before and after restart $ sudo salt -L list_of_minions cmd.run "service salt-minion status"
Check if minions reply before and after saltutil.refresh_pillar, e.g. the actual problem $ sudo salt -L list_of_minions test.ping
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.