Hello,
I've had this issue for a long time. In my setup, my master is behind a non reliable internet line that sometimes lose connection.
In the case when my master gets disconnected - Either because of the line or a simple service restart - minions fails to connect back to the master.
I use the following minion config:
default_include: minion.d/*.conf
master: master.xxxx
master_alive_interval: 30
master_tries: -1
ping_interval: 1
tcp_keepalive: True
tcp_keepalive_idle: 60
grains_refresh_every: 5
I've noted that they most of time get back after "grains_refresh_every" delay if the delay is small enough... But sometimes - actually quite often - they don't.
Some minion will end up with this log:
2017-05-13 02:32:26,394 [salt.minion ][ERROR ][2812] ** Master Ping failed. Attempting to restart minion**
Some not... Result is the same: Minion can't be contacted until the agent has been restarted.
Any idea what's going on? Is there a way to test from the minion if the connection to the server is fine to actively restart it?
Version reports:
# salt-minion --versions-report
Salt Version:
Salt: 2016.11.4
Dependency Versions:
cffi: 1.10.0
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.9.6
libgit2: 0.25.1
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.25.0
Python: 2.7.13 (default, Dec 22 2016, 09:22:15)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.1
ZMQ: 4.1.5
System Versions:
dist:
machine: x86_64
release: 4.9.19-0-virtgrsec
system: Linux
version: Not Installed
# salt --versions-report
Salt Version:
Salt: 2016.11.4
Dependency Versions:
cffi: 1.8.3
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.9.6
libgit2: 0.25.1
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.25.0
Python: 2.7.13 (default, Dec 22 2016, 09:22:15)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.4.2
ZMQ: 4.1.5
System Versions:
dist:
machine: x86_64
release: 4.9.24-2-virtgrsec
system: Linux
version: Not Installed