Repository navigation
Closed
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVECorerelates to code central or existential to SaltP3Priority 3bugbroken, 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
Milestone
Description
I'm not sure exactly what's not working here, but I suspect it's the config parsing system specifically not finding max_event_size in my master config file. Okie, this is what the docs say (and this is in the example master config):
# Passing very large events can cause the minion to consume large amounts of
# memory. This value tunes the maximum size of a message allowed onto the
# master event bus. The value is expressed in bytes.
#max_event_size: 1048576So I set my config value...
max_event_size: 104857600And it does nothing. To illustrate I made the following changes:
--- a/salt/minion.py
+++ b/salt/minion.py
@@ -819,6 +819,7 @@ class Minion(MinionBase):
if beacons:
self._fire_master(events=beacons)
for beacon in beacons:
+ log.debug('mes @ minion: '+self.opts.get('max_event_size', 'missing'))
serialized_data = salt.utils.dicttrim.trim_dict(
self.serial.dumps(beacon['data']),
self.opts.get('max_event_size', 1048576),
--- a/salt/utils/event.py
+++ b/salt/utils/event.py
@@ -493,6 +493,7 @@ class SaltEvent(object):
data['_stamp'] = datetime.datetime.utcnow().isoformat()
tagend = TAGEND
+ log.debug('mes @ event: '+self.opts.get('max_event_size', 'missing'))
serialized_data = salt.utils.dicttrim.trim_dict(
self.serial.dumps(data),
self.opts.get('max_event_size', 1048576),The result.... lots and lots of
[DEBUG ] mes @ event: missing
I don't know nearly enough about the way the config system is setup to be able to fix this, but it's pretty much a show stopper for anyone wanting to exceed that 1M limit ... it's basically nuking my pillar data when it grows past 1M and I've resorted to disabling the trim test completely:
--- a/salt/utils/dicttrim.py
+++ b/salt/utils/dicttrim.py
@@ -46,7 +46,8 @@ def trim_dict(
dict_size = sys.getsizeof(data)
else:
dict_size = sys.getsizeof(serializer.dumps(data))
- if dict_size > max_dict_bytes:
+ if False:
+ #if dict_size > max_dict_bytes:
if is_msgpacked:
data = serializer.loads(data)
while True:Metadata
Metadata
Assignees
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVECorerelates to code central or existential to SaltP3Priority 3bugbroken, 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 20, 2015
Thanks for the report @kaithar. Can you also post the output of
salt --versions-reportfor historical purposes? That will also help us debug.kaithar commentedon May 20, 2015
Seems
--versions-reporthas hard dep on nacl... will install.kaithar commentedon May 20, 2015
(I'm running against develop, last commit pulled appears to be 31680c7)
kaithar commentedon May 20, 2015
When I restarted the minion on my master I noticed an additional confirmation that the problem seems to be specific to the master ... the minion appears to get a number in
salt/utils/event.pywhile the master gets the default "missing" string I gave it. I'll double check what the minion is seeing after lunch.msteed commentedon May 20, 2015
Verified that the master config value is being parsed and saved but then apparently lost. Investigating...
issue saltstack#23883
Merge pull request #24001 from msteed/issue-23883
Merge pull request #24065 from makinacorpus/real23883