Cleans up config parameters

This commit is contained in:
twangboy 2016-07-08 16:14:48 -06:00 committed by Mike Place
parent 003e60f6c6
commit 3833c008b2
6 changed files with 27 additions and 23 deletions

View file

@ -989,6 +989,7 @@ class TestDaemon(object):
with salt.utils.fopen(tests_known_hosts_file, 'w') as known_hosts:
known_hosts.write('')
# This master connects to syndic_master via a syndic
master_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'master'))
master_opts['known_hosts_file'] = tests_known_hosts_file
master_opts['cachedir'] = os.path.join(TMP, 'rootdir', 'cache')
@ -997,6 +998,15 @@ class TestDaemon(object):
master_opts['root_dir'] = os.path.join(TMP, 'rootdir')
master_opts['pki_dir'] = os.path.join(TMP, 'rootdir', 'pki', 'master')
# This is the syndic for master
# Let's start with a copy of the syndic master configuration
syndic_opts = copy.deepcopy(master_opts)
# Let's update with the syndic configuration
syndic_opts.update(salt.config._read_conf_file(os.path.join(CONF_DIR, 'syndic')))
syndic_opts['cachedir'] = os.path.join(TMP, 'rootdir', 'cache')
syndic_opts['config_dir'] = TMP_SYNDIC_MINION_CONF_DIR
# This minion connects to master
minion_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'minion'))
minion_opts['cachedir'] = os.path.join(TMP, 'rootdir', 'cache')
minion_opts['user'] = running_tests_user
@ -1004,6 +1014,7 @@ class TestDaemon(object):
minion_opts['root_dir'] = os.path.join(TMP, 'rootdir')
minion_opts['pki_dir'] = os.path.join(TMP, 'rootdir', 'pki', 'minion')
# This sub_minion also connects to master
sub_minion_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'sub_minion'))
sub_minion_opts['cachedir'] = os.path.join(TMP, 'rootdir-sub-minion', 'cache')
sub_minion_opts['user'] = running_tests_user
@ -1011,6 +1022,7 @@ class TestDaemon(object):
sub_minion_opts['root_dir'] = os.path.join(TMP, 'rootdir-sub-minion')
sub_minion_opts['pki_dir'] = os.path.join(TMP, 'rootdir-sub-minion', 'pki', 'minion')
# This is the master of masters
syndic_master_opts = salt.config._read_conf_file(os.path.join(CONF_DIR, 'syndic_master'))
syndic_master_opts['cachedir'] = os.path.join(TMP, 'rootdir-syndic-master', 'cache')
syndic_master_opts['user'] = running_tests_user
@ -1018,16 +1030,6 @@ class TestDaemon(object):
syndic_master_opts['root_dir'] = os.path.join(TMP, 'rootdir-syndic-master')
syndic_master_opts['pki_dir'] = os.path.join(TMP, 'rootdir-syndic-master', 'pki', 'master')
# The syndic config file has an include setting to include the master configuration
# Let's start with a copy of the syndic master configuration
syndic_opts = copy.deepcopy(master_opts)
# Let's update with the syndic configuration
syndic_opts.update(salt.config._read_conf_file(os.path.join(CONF_DIR, 'syndic')))
# Lets remove the include setting
syndic_opts.pop('include')
syndic_opts['cachedir'] = os.path.join(TMP, 'rootdir', 'cache')
syndic_opts['user'] = running_tests_user
syndic_opts['config_dir'] = TMP_SYNDIC_MINION_CONF_DIR
if transport == 'raet':
master_opts['transport'] = 'raet'

View file

@ -1,3 +1,5 @@
# Master Settings
# Connects to syndic_master via syndic
id: master
publish_port: 64505
ret_port: 64506
@ -6,7 +8,6 @@ pidfile: master.pid
sock_dir: master_sock
timeout: 3
open_mode: True
syndic_master: localhost
fileserver_list_cache_time: 0
file_buffer_size: 8192
pillar_opts: True

View file

@ -1,4 +1,5 @@
# basic config
# Connects to master
master: localhost
master_port: 64506
tcp_pub_port: 64510

View file

@ -1,4 +1,5 @@
# basic config
# Connects to master
master: localhost
master_port: 64506
tcp_pub_port: 64520

View file

@ -1,13 +1,8 @@
include: master
# syndic basic config
# same config as master ./except the syndic bits
# in the TestCase we add at the top of the configfile the content of ./master
# to avoid duplication
order_masters: True
acceptance_wait_time: 1
syndic_log_file: syndic.log
log_level_logfile: debug
syndic_pidfile: syndic.pid
# Syndic Settings
id: syndic
syndic_master: localhost
syndic_master_port: 54506
id: syndic
syndic_log_file: syndic.log
syndic_pidfile: syndic.pid
tcp_pub_port: 64530
tcp_pull_port: 64531

View file

@ -1,3 +1,5 @@
# Master Settings
# This is the Master of Masters
id: syndic_master
publish_port: 54505
ret_port: 54506
@ -6,10 +8,12 @@ pidfile: syndic_master.pid
sock_dir: syndic_master_sock
timeout: 1
open_mode: True
order_masters: True
fileserver_list_cache_time: 0
pillar_opts: True
tcp_master_publish_pull: 33305
tcp_master_workers: 33306
log_file: syndic_master.log
log_level_logfile: debug
# Syndic Settings
order_masters: True