Merge pull request #35411 from eliasp/2016.3-modules.event-handle-file_client-opt

modules.event.send(): Prevent backtrace for masterless Minions
This commit is contained in:
Mike Place 2016-08-12 21:29:01 +09:00 committed by GitHub
commit 4dc776ffbf

View file

@ -39,7 +39,7 @@ def fire_master(data, tag, preload=None):
salt '*' event.fire_master '{"data":"my event data"}' 'tag'
'''
if __opts__.get('local', None):
if (__opts__.get('local', None) or __opts__.get('file_client', None) == 'local') and not __opts__.get('use_master_when_local', False):
# We can't send an event if we're in masterless mode
log.warning('Local mode detected. Event with tag {0} will NOT be sent.'.format(tag))
return False