mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Set up dynamic config
This commit is contained in:
parent
3cfb82cdd4
commit
0dfe3aaf31
@ -2980,6 +2980,11 @@ def apply_minion_config(overrides=None,
|
|||||||
if 'beacons' not in opts:
|
if 'beacons' not in opts:
|
||||||
opts['beacons'] = {}
|
opts['beacons'] = {}
|
||||||
|
|
||||||
|
if overrides.get('ipc_write_buffer', '') == 'dynamic':
|
||||||
|
opts['ipc_write_buffer'] = _DFLT_IPC_WBUFFER
|
||||||
|
if 'ipc_write_buffer' not in overrides:
|
||||||
|
opts['ipc_write_buffer'] = 0
|
||||||
|
|
||||||
# if there is no schedule option yet, add an empty scheduler
|
# if there is no schedule option yet, add an empty scheduler
|
||||||
if 'schedule' not in opts:
|
if 'schedule' not in opts:
|
||||||
opts['schedule'] = {}
|
opts['schedule'] = {}
|
||||||
@ -3054,7 +3059,10 @@ def apply_master_config(overrides=None, defaults=None):
|
|||||||
)
|
)
|
||||||
opts['token_dir'] = os.path.join(opts['cachedir'], 'tokens')
|
opts['token_dir'] = os.path.join(opts['cachedir'], 'tokens')
|
||||||
opts['syndic_dir'] = os.path.join(opts['cachedir'], 'syndics')
|
opts['syndic_dir'] = os.path.join(opts['cachedir'], 'syndics')
|
||||||
|
if overrides.get('ipc_write_buffer', '') == 'dynamic':
|
||||||
|
opts['ipc_write_buffer'] = _DFLT_IPC_WBUFFER
|
||||||
|
if 'ipc_write_buffer' not in overrides:
|
||||||
|
opts['ipc_write_buffer'] = 0
|
||||||
using_ip_for_id = False
|
using_ip_for_id = False
|
||||||
append_master = False
|
append_master = False
|
||||||
if not opts.get('id'):
|
if not opts.get('id'):
|
||||||
|
@ -508,7 +508,8 @@ class IPCMessagePublisher(object):
|
|||||||
def handle_connection(self, connection, address):
|
def handle_connection(self, connection, address):
|
||||||
log.trace('IPCServer: Handling connection to address: {0}'.format(address))
|
log.trace('IPCServer: Handling connection to address: {0}'.format(address))
|
||||||
try:
|
try:
|
||||||
if self.opts['ipc_write_buffer']:
|
if self.opts['ipc_write_buffer'] > 0:
|
||||||
|
log.trace('Setting IPC connection write buffer: {0}'.format((self.opts['ipc_write_buffer'])))
|
||||||
stream = IOStream(
|
stream = IOStream(
|
||||||
connection,
|
connection,
|
||||||
io_loop=self.io_loop,
|
io_loop=self.io_loop,
|
||||||
|
Loading…
Reference in New Issue
Block a user