You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Presence change events constantly reporting all minions as new in 2015.5 #23776
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVECorerelates to code central or existential to SaltP1Priority 1bugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
ISSUE: the salt/presence/change event in 2015.5 is always reporting the full list of connected minions as "newly connected", despite the fact that their connection wasn't disrupted.
As I can see in the master.py source file, the presence handling code has been moved into a separate function and now the old_present list is referenced and assigned in local scope, what makes it remain empty in every run of the main master maintenance loop.
# salt-run state.event pretty=True
salt/presence/change {
"_stamp": "2015-05-15T16:33:56.944705",
"lost": [],
"new": [
<here goes every time the list of all currently connected minions>
]
}
Salt version:
# salt --versions-report
Salt: 2015.5.0
Python: 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
Jinja2: 2.2.1
M2Crypto: 0.20.2
msgpack-python: 0.4.6
msgpack-pure: Not Installed
pycrypto: 2.0.1
libnacl: Not Installed
PyYAML: 3.10
ioflo: Not Installed
PyZMQ: 14.3.1
RAET: Not Installed
ZMQ: 3.2.5
Mako: Not Installed
@enblde - We believe this is fixed by the above PR. If you still see the repeated presence events with that change in place, feel free to reopen & provide details here. Thanks!
I'm facing the issue, it randomly reports all the minions as new (8 minutes, 3 minutes, every 1 minute sometimes, but never more than 10 minutes).
Master:
salt --versions-report
Salt Version:
Salt: 2016.3.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.5
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.5 (default, Oct 11 2015, 17:47:16)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.7.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: redhat 7.2 Maipo
machine: x86_64
release: 3.10.0-327.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.2 Maipo
Most of the minions:
salt-minion --versions-report
Salt Version:
Salt: 2016.3.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.4.1
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: unknown
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.20.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.6.6 (r266:84292, May 22 2015, 08:34:51)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.5.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: redhat 6.4 Santiago
machine: x86_64
release: 2.6.32-358.23.2.el6.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 6.4 Santiago
it seems that this issue reoccurred, about every hour the event "presence new" is triggered for all minions, although there was no absent event before.
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVECorerelates to code central or existential to SaltP1Priority 1bugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
rallytime commentedon May 18, 2015
Thanks for the report @enblde.
issue saltstack#23776
msteed commentedon May 21, 2015
@enblde - thanks for the detective work!
Merge pull request #24005 from msteed/issue-23776
msteed commentedon Jun 2, 2015
@enblde - We believe this is fixed by the above PR. If you still see the repeated presence events with that change in place, feel free to reopen & provide details here. Thanks!
akimyonoglu commentedon Jun 7, 2015
applied 0b35f17 and works fine
jfindlay commentedon Jun 9, 2015
#24005.
sebw commentedon Jun 23, 2016
I'm facing the issue, it randomly reports all the minions as new (8 minutes, 3 minutes, every 1 minute sometimes, but never more than 10 minutes).
Master:
salt --versions-report
Salt Version:
Salt: 2016.3.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.5
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.5 (default, Oct 11 2015, 17:47:16)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.7.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: redhat 7.2 Maipo
machine: x86_64
release: 3.10.0-327.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.2 Maipo
Most of the minions:
salt-minion --versions-report
Salt Version:
Salt: 2016.3.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.4.1
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: unknown
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.20.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.6.6 (r266:84292, May 22 2015, 08:34:51)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.5.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: redhat 6.4 Santiago
machine: x86_64
release: 2.6.32-358.23.2.el6.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 6.4 Santiago
stephanwiechert commentedon Mar 12, 2024
Hi there,
it seems that this issue reoccurred, about every hour the event "presence new" is triggered for all minions, although there was no absent event before.
Master:
Salt Version:
Salt: 3006.7
Python Version:
Python: 3.10.13 (main, Feb 19 2024, 03:31:20) [GCC 11.2.0]
Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.3
libgit2: Not Installed
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.19.1
pygit2: Not Installed
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: 0.15.1
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 22.04.4 jammy
locale: utf-8
machine: x86_64
release: 5.15.0-97-generic
system: Linux
version: Ubuntu 22.04.4 jammy
Salt Minion:
Salt Version:
Salt: 3006.3
Python Version:
Python: 3.10.13 (main, Sep 6 2023, 02:11:27) [GCC 11.2.0]
Dependency Versions:
cffi: 1.14.6
cherrypy: 18.6.1
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: Not Installed
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: 0.13.10
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 22.04.4 jammy
locale: utf-8
machine: x86_64
release: 5.15.0-97-generic
system: Linux
version: Ubuntu 22.04.4 jammy
We are using a script to alert if minions change there state, here it is:
import salt.config
import salt.utils.event
from create_opsgenie_alert import create_opsgenie_alerts
opts = salt.config.client_config("/etc/salt/master/")
event = salt.utils.event.get_event("master", sock_dir=opts["sock_dir"], opts=opts)
for data in event.iter_events(tag="salt/presence/change"):
alertmsg = "Salt Minion Presence State changed..."
message = "Minion presence changed:\n new: {},\n lost: {}".format(data.get('new'), data.get('lost'))
print(message)
# fire opsgenie alert
create_opsgenie_alerts(alertmsg,'Message:\n {}'.format(message), "Salt Minion State Change Alert","P3")