salt icon indicating copy to clipboard operation
salt copied to clipboard

Intermittent connection problems to 0.17.1 minions

Open mekstrem opened this issue 13 years ago • 40 comments

When I execute a command from the salt master to the salt minions I often encounter problems with minions timing out. Following text is an excerpt from my bash. I have modified the minion names for security reasons. Everything is executed in a sequential order.

This is the first execution I do after all the minions were upgraded to verify that they have the correct version.

mekstrem ~# salt -v 'minion*' test.version
Executing job with jid 20131106090627386667
-------------------------------------------

minion4:
    0.17.1
minion2:
    0.17.1
minion1:
    0.17.1
minion5:
    0.17.1
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
SaltReqTimeoutError: Waited 60 seconds
Traceback (most recent call last):
  File "/usr/bin/salt", line 10, in <module>
    salt_main()
  File "/usr/lib64/python2.6/site-packages/salt/scripts.py", line 117, in salt_main
    client.run()
  File "/usr/lib64/python2.6/site-packages/salt/cli/__init__.py", line 133, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 484, in cmd_cli
    **kwargs):
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 1062, in get_cli_event_returns
    jinfo = self.gather_job_info(jid, tgt, tgt_type, **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 169, in gather_job_info
    **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 433, in cmd
    **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 228, in run_job
    **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 1214, in pub
    payload = sreq.send('clear', payload_kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/payload.py", line 193, in send
    timeout * tried
SaltReqTimeoutError: Waited 60 seconds
Traceback (most recent call last):
  File "/usr/bin/salt", line 10, in <module>
    salt_main()
  File "/usr/lib64/pythoasdfasfn2.6/site-packages/salt/scripts.py", line 117, in salt_main
    client.run()
  File "/usr/lib64/python2.6/site-packages/salt/cli/__init__.py", line 133, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 484, in cmd_cli
    **kwargs):
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 1062, in get_cli_event_returns
    jinfo = self.gather_job_info(jid, tgt, tgt_type, **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 169, in gather_job_info
    **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 433, in cmd
    **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 228, in run_job
    **kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/client/__init__.py", line 1214, in pub
    payload = sreq.send('clear', payload_kwargs)
  File "/usr/lib64/python2.6/site-packages/salt/payload.py", line 193, in send
    timeout * tried
salt.exceptions.SaltReqTimeoutError: Waited 60 seconds

Here I try to do a test.version again about 15-20 seconds after the timeout and it seems like the communication to all minions are gone.

mekstrem ~# salt -v 'minion*' test.version
Executing job with jid 20131106090738963305
-------------------------------------------
minion4:
    Minion did not return
minion2:
    Minion did not return
minion1:
    Minion did not return
minion3:
    Minion did not return
minion5:
    Minion did not return

Yet again I wait some time and execute the same command and it finally works like it should.

mekstrem ~# salt -v 'minion*' test.version
Executing job with jid 20131106090752034671
-------------------------------------------

minion4:
    0.17.1
minion2:
    0.17.1
minion1:
    0.17.1
minion3:
    0.17.1
minion5:
    0.17.1

Master Versions

Salt: 0.17.1
Python: 2.6.8 (unknown, May 29 2012, 22:30:44)
Jinja2: 2.7.1
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.5
PyYAML: 3.10
PyZMQ: 13.0.0
ZMQ: 3.2.4

Minion Versions

Salt: 0.17.1
Python: 2.6.8 (unknown, May 29 2012, 22:34:54)
Jinja2: 2.7.1
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.5
PyYAML: 3.10
PyZMQ: 13.0.0
ZMQ: 3.2.4

cc @holmboe, @kinware

mekstrem avatar Nov 06 '13 10:11 mekstrem

Same problem here, with Debian 7, 64bits, on VMware, and the following versions for both master and minions :

Salt: 0.17.1 Python: 2.7.3 (default, Jan 2 2013, 13:56:14) Jinja2: 2.6 M2Crypto: 0.21.1 msgpack-python: 0.1.10 msgpack-pure: Not Installed pycrypto: 2.6 PyYAML: 3.10 PyZMQ: 13.1.0 ZMQ: 3.2.3

edomaur avatar Nov 06 '13 10:11 edomaur

I am working in the same setup as @mekstrem and can add that the master is a 64-bit installation, and 32-bit installations on the minions. That is the reason why the Python version is built (by upstream) at different hours.

On the master:

$ cat /etc/SuSE-release 
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

On the minions:

$ cat /etc/SuSE-release 
SUSE Linux Enterprise Server 11 (i586)
VERSION = 11
PATCHLEVEL = 1

And they are connected through various switches and routers, with that I want to say they are not on the same LAN.

holmboe avatar Nov 06 '13 11:11 holmboe

The salt-master process hogs the CPU while it is not working. A strace -p of one of those processes for a few seconds gives (sorry for the longish post, also note that the salt ids have been redacted):

stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=56, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(24, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=8*1024, rlim_max=8*1024}) = 0
open("/etc/salt/pki/master/minions", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 60
getdents64(60, /* 586 entries */, 32768) = 32752
getdents64(60, /* 515 entries */, 32768) = 28840
getdents64(60, /* 0 entries */, 32768)  = 0
close(60)                               = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion7", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion0", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0

[...]  # Repeats a few hundred times (minion1 was also in the above stat() lines, but was mistakenly redacted)

stat("/etc/salt/pki/master/minions_rejected/minion1", 0x7fff434641e0) = -1 ENOENT (No such file or directory)
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/master.pub", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/master.pub", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=56, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(24, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=8*1024, rlim_max=8*1024}) = 0
open("/etc/salt/pki/master/minions", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 60
getdents64(60, /* 586 entries */, 32768) = 32752
getdents64(60, /* 515 entries */, 32768) = 28840
getdents64(60, /* 0 entries */, 32768)  = 0
close(60)                               = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0

[...]  # Repeats a few hundred times

stat("/etc/salt/pki/master/minions_rejected/minion3", 0x7fff434641e0) = -1 ENOENT (No such file or directory)
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/minions/minion3", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/minions/minion3", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/master.pub", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/master.pub", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=56, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(24, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=8*1024, rlim_max=8*1024}) = 0
open("/etc/salt/pki/master/minions", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 60
getdents64(60, /* 586 entries */, 32768) = 32752
getdents64(60, /* 515 entries */, 32768) = 28840
getdents64(60, /* 0 entries */, 32768)  = 0
close(60)                               = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion7", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion0", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0

[...]  # Repeats a few hundred times

stat("/etc/salt/pki/master/minions_rejected/minion1", 0x7fff434641e0) = -1 ENOENT (No such file or directory)
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/master.pub", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/master.pub", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=56, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(24, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=8*1024, rlim_max=8*1024}) = 0
open("/etc/salt/pki/master/minions", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 60
getdents64(60, /* 586 entries */, 32768) = 32752
getdents64(60, /* 515 entries */, 32768) = 28840
getdents64(60, /* 0 entries */, 32768)  = 0
close(60)                               = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion7", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion0", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0

[...]  # Repeats a few hundred times

stat("/etc/salt/pki/master/minions_rejected/minion5", 0x7fff434641e0) = -1 ENOENT (No such file or directory)
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/minions/minion5", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/minions/minion5", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/master.pub", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/master.pub", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0

holmboe avatar Nov 06 '13 11:11 holmboe

This is also what's happening in one of those minion logs when salt master hogs 100% cpu.

2013-11-06 12:37:16,456 [salt.minion                                 ][CRITICAL] An exception occurred while polling th
e minion
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/minion.py", line 1102, in tune_in
    self._handle_payload(payload)
  File "/usr/lib/python2.6/site-packages/salt/minion.py", line 540, in _handle_payload
    'clear': self._handle_clear}[payload['enc']](payload['load'])
  File "/usr/lib/python2.6/site-packages/salt/minion.py", line 558, in _handle_aes
    data = self.crypticle.loads(load)
  File "/usr/lib/python2.6/site-packages/salt/crypt.py", line 424, in loads
    data = self.decrypt(data)
  File "/usr/lib/python2.6/site-packages/salt/crypt.py", line 407, in decrypt
    raise AuthenticationError('message authentication failed')
AuthenticationError: message authentication failed

If you wait some minutes the salt master will go back to normal state and use 0% CPU and then it works to execute commands as normal.

mekstrem avatar Nov 06 '13 12:11 mekstrem

I managed to catch a strace -p at JUST the right moment when salt-master stops hogging the CPU.

stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion6", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion4", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion7", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion2", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion5", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions/minion3", {st_mode=S_IFREG|0644, st_size=796, ...}) = 0
stat("/etc/salt/pki/master/minions_rejected/another_minion1", 0x7fff434641e0) = -1 ENOENT (No such file or directory)
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/minions/minion1", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/minions/minion1", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/minions/minion1", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/salt/pki/master/master.pub", {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
open("/etc/salt/pki/master/master.pub", O_RDONLY) = 60
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0644, st_size=800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
read(60, "-----BEGIN PUBLIC KEY-----\nMIICI"..., 4096) = 800
read(60, "", 4096)                      = 0
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=56, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(24, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=58, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/nocache", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion2", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
mkdir("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion2", 0777) = 0
open("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion2/.___atomic_write4lxFvP", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 60
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fcntl(60, F_GETFL)                      = 0x28002 (flags O_RDWR|O_LARGEFILE|O_NOFOLLOW)
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(60, "\200", 1)                    = 1
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
rename("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion2/.___atomic_write4lxFvP", "/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion2/return.p") = 0
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=58, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/nocache", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
mkdir("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1", 0777) = 0
open("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1/.___atomic_write_4xQ7x", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 60
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fcntl(60, F_GETFL)                      = 0x28002 (flags O_RDWR|O_LARGEFILE|O_NOFOLLOW)
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(60, "\200", 1)                    = 1
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
rename("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1/.___atomic_write_4xQ7x", "/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1/return.p") = 0
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=58, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/nocache", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
mkdir("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1", 0777) = 0
open("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1/.___atomic_writeoB2nNs", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 60
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fcntl(60, F_GETFL)                      = 0x28002 (flags O_RDWR|O_LARGEFILE|O_NOFOLLOW)
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(60, "\200", 1)                    = 1
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
rename("/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1/.___atomic_writeoB2nNs", "/var/cache/salt/master/jobs/40/22d20b23e3831b519b61ef291e95ad/minion1/return.p") = 0
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/.dfn", {st_mode=S_IFREG|0400, st_size=76, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
poll([{fd=58, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
write(38, "\1\0\0\0\0\0\0\0", 8)        = 8
stat("/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21/nocache", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21/minion3", 0x7fff43463f80) = -1 ENOENT (No such file or directory)
stat("/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
mkdir("/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21/minion3", 0777) = 0
open("/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21/minion3/.___atomic_writeauRtTC", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 60
fcntl(60, F_GETFD)                      = 0
fcntl(60, F_SETFD, FD_CLOEXEC)          = 0
fcntl(60, F_GETFL)                      = 0x28002 (flags O_RDWR|O_LARGEFILE|O_NOFOLLOW)
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0e150c000
lseek(60, 0, SEEK_CUR)                  = 0
fstat(60, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(60, "\2460.17.1", 7)              = 7
close(60)                               = 0
munmap(0x7fe0e150c000, 4096)            = 0
rename("/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21/minion3/.___atomic_writeauRtTC", "/var/cache/salt/master/jobs/48/e611ac5f0db6f374b4bec727333f21/minion3/return.p") = 0
poll([{fd=54, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(52, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=54, events=POLLIN}], 1, -1^C <unfinished ...>

[Ctrl+C]

Process 25338 detached

holmboe avatar Nov 06 '13 12:11 holmboe

Have you guys tested to see if these problems are present in current develop branch?

Thanks for all the detective work, we'll look into it!

basepi avatar Nov 06 '13 22:11 basepi

@basepi : sorry, no, I cannot do that test currently (no time...)

However, that kind of connection failure remembers me of a ZMQ 2.X problem I had around the begining of the Salt development (I was writing a somewhat concurrent tool, in Python, with ZMQ, but Thatch45's work was already so much better...) Sometime, the socket failed to close correctly at the end of a session, and was left "open". When a new session was requested, it resulted in a zmq socket already openned, but pointing to nowhere for a long time. I couldn't solve that problem, as it seemed to be corrected in ZMQ 3.X.

Well, just my 2 cents, it's probably not related.

edomaur avatar Nov 07 '13 11:11 edomaur

@baspi FYI, I will be able to test this at earliest on monday.

holmboe avatar Nov 07 '13 11:11 holmboe

Just to add some more info about these timeouts on master. Occasionally i've seen in the minion logs something like "ZMQError: Operation cannot be accomplished in current state" and when you look at the last step of the traceback it's in ZMQ.socket.send(pkg) where it times out. I'll look into it more today and see if I can find the whole traceback (got gazillions minions so it will take time)

mekstrem avatar Nov 08 '13 07:11 mekstrem

I am wondering, could this be related to issue #6306 ?

edomaur avatar Nov 08 '13 09:11 edomaur

I have the same problem (master or minion loosing connection after a few minutes). The problem was occasionally on 0.17.0 and is reproducible on 0.17.1. What I find curious is that I don't have any kind of error message in my log files although they are on trace. Is there a way for me to get access to the network or ZeroMQ logging or help otherwise with debugging this?

When I run salt with debug I get the following output on the console, the minion log file does not list anything and the master log file just repeats the command.

cupenya@**m:~$ sudo salt '*-1' test.ping -l debug
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/cupenya/.salt
[DEBUG   ] loading log_handlers in ['/var/cache/salt/master/extmods/log_handlers', '/usr/lib/pymodules/python2.7/salt/log/handlers']
[DEBUG   ] Skipping /var/cache/salt/master/extmods/log_handlers, it is not a directory
[DEBUG   ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG   ] Configuration file path: /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/cupenya/.salt
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc

Running 0.17.1 on Ubuntu 12.04 on Microsoft Azure.

elm- avatar Nov 08 '13 16:11 elm-

I'll confirm seeing this issue as well. I'm running minions in LXC containers connecting to the master which runs on the physical host to the containers.

Running 0.17.1 on Wheezy. edit: and still getting it w/develop

therealbill avatar Nov 08 '13 19:11 therealbill

cc @s0l4r

holmboe avatar Nov 12 '13 09:11 holmboe

I can also confirm this bug, exactly the same behaviour with 0.17.1 under Debian Wheezy. Makes Salt unusable, had to switch back to an older version.

phaf avatar Nov 13 '13 08:11 phaf

@phafner which version of salt worked for you?

elm- avatar Nov 13 '13 10:11 elm-

@elm- Version 0.16.4 works for me.

phaf avatar Nov 14 '13 14:11 phaf

v0.16.4 doesn't work for me but because of another bug, not this one...

edomaur avatar Nov 14 '13 14:11 edomaur

We also have this issue with salt 0.16.4. We just configured TCP keep alive because the ports are behind the Azure Endpoint firewall, maybe it drops idle connections.

elm- avatar Nov 14 '13 17:11 elm-

That was the problem on our site, the connections were closed by the azure load balancer. Curiously though that there is no timeout or something in the salt stack log files.

elm- avatar Nov 15 '13 13:11 elm-

What are our networks configuration ? could it be related to the virtualization layer ?

edomaur avatar Nov 15 '13 13:11 edomaur