From 714932c82596520999c3f1fba3d693087c0cbec3 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 14:12:35 +0000 Subject: [PATCH 01/14] Try to use '/etc/st2/' path for the new st2 services logging config --- st2actions/st2actions/scheduler/config.py | 2 +- st2actions/st2actions/workflows/config.py | 2 +- st2reactor/st2reactor/timer/config.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/st2actions/st2actions/scheduler/config.py b/st2actions/st2actions/scheduler/config.py index 628990861d..b6050fcfe7 100644 --- a/st2actions/st2actions/scheduler/config.py +++ b/st2actions/st2actions/scheduler/config.py @@ -42,7 +42,7 @@ def _register_service_opts(): scheduler_opts = [ cfg.StrOpt( 'logging', - default='conf/logging.scheduler.conf', + default='/etc/st2/logging.scheduler.conf', help='Location of the logging configuration file.' ) ] diff --git a/st2actions/st2actions/workflows/config.py b/st2actions/st2actions/workflows/config.py index 9497c1c401..ac659ef29c 100644 --- a/st2actions/st2actions/workflows/config.py +++ b/st2actions/st2actions/workflows/config.py @@ -42,7 +42,7 @@ def _register_service_opts(): wf_engine_opts = [ cfg.StrOpt( 'logging', - default='conf/logging.workflowengine.conf', + default='/etc/st2/logging.workflowengine.conf', help='Location of the logging configuration file.' ) ] diff --git a/st2reactor/st2reactor/timer/config.py b/st2reactor/st2reactor/timer/config.py index 619c0b0788..a4416ede97 100644 --- a/st2reactor/st2reactor/timer/config.py +++ b/st2reactor/st2reactor/timer/config.py @@ -47,7 +47,7 @@ def _register_timers_engine_opts(): # under ``timer`` section as well as ``timersengine``. logging_opts = [ cfg.StrOpt( - 'logging', default='conf/logging.timersengine.conf', + 'logging', default='/etc/st2/logging.timersengine.conf', help='Location of the logging configuration file.') ] From 7b91efad0f73ea69af3a4a75ac480c92c0286726 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 15:42:52 +0000 Subject: [PATCH 02/14] Use prod '/etc/st2' logging config for the new serves in st2.conf.sample --- conf/st2.conf.sample | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index 1cae55ad46..e7f0be1fa4 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -330,7 +330,7 @@ enable = True # Timezone pertaining to the location where st2 is run. local_timezone = America/Los_Angeles # Location of the logging configuration file. -logging = conf/logging.timersengine.conf +logging = /etc/st2/logging.timersengine.conf [timersengine] # Specify to enable timer service. @@ -338,7 +338,7 @@ enable = True # Timezone pertaining to the location where st2 is run. local_timezone = America/Los_Angeles # Location of the logging configuration file. -logging = conf/logging.timersengine.conf +logging = /etc/st2/logging.timersengine.conf [webui] # Base https URL to access st2 Web UI. This is used to construct history URLs that are sent out when chatops is used to kick off executions. @@ -346,5 +346,5 @@ webui_base_url = https://localhost [workflow_engine] # Location of the logging configuration file. -logging = conf/logging.workflowengine.conf +logging = /etc/st2/logging.workflowengine.conf From ea38894f92d33ad8c2b58cb5090e88aad49fd7e6 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 17:01:29 +0000 Subject: [PATCH 03/14] Add a CHANGELOG --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 333ba956ab..8129ae038f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -49,6 +49,8 @@ Changed If user wants to retrieve and view all the attributes, they can use ``--attr all`` CLI command argument (same as before). (improvement) #4396 +* Improve ``st2.conf`` migration for the new services by using prod-friendly logging settings by default #4415 + Fixed ~~~~~ From ac44874eb5ad3bbb5b65554a4f057160523b25bf Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 17:31:53 +0000 Subject: [PATCH 04/14] Prod-friendly logging config path for st2api --- conf/st2.conf.sample | 2 +- st2api/st2api/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index e7f0be1fa4..fc9881e722 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -31,7 +31,7 @@ python_binary = /usr/bin/python # List of origins allowed for api, auth and stream allow_origin = http://127.0.0.1:3000 # comma separated list allowed here. # location of the logging.conf file -logging = conf/logging.conf +logging = /etc/st2/logging.api.conf # Maximum limit (page size) argument which can be specified by the user in a query string. max_page_size = 100 # True to mask secrets in the API responses diff --git a/st2api/st2api/config.py b/st2api/st2api/config.py index 2483990542..bfee0c04a5 100644 --- a/st2api/st2api/config.py +++ b/st2api/st2api/config.py @@ -72,7 +72,7 @@ def _register_app_opts(): logging_opts = [ cfg.BoolOpt('debug', default=False), cfg.StrOpt( - 'logging', default='conf/logging.conf', + 'logging', default='/etc/st2/logging.api.conf', help='location of the logging.conf file'), cfg.IntOpt( 'max_page_size', default=100, From 5fab1f42ffb5b81a88ca47f27c6df7d8a9eac68f Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 17:33:53 +0000 Subject: [PATCH 05/14] Prod-friendly logging config path for st2stream --- conf/st2.conf.sample | 2 +- st2stream/st2stream/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index fc9881e722..65b76c2cac 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -292,7 +292,7 @@ heartbeat = 25 # StackStorm stream API server host host = 127.0.0.1 # location of the logging.conf file -logging = conf/logging.conf +logging = /etc/st2/logging.stream.conf # StackStorm API stream, server port port = 9102 diff --git a/st2stream/st2stream/config.py b/st2stream/st2stream/config.py index 3d48e9e846..99f6be9883 100644 --- a/st2stream/st2stream/config.py +++ b/st2stream/st2stream/config.py @@ -63,7 +63,7 @@ def _register_app_opts(): 'debug', default=False, help='Specify to enable debug mode.'), cfg.StrOpt( - 'logging', default='conf/logging.conf', + 'logging', default='/etc/st2/logging.stream.conf', help='location of the logging.conf file') ] From 03d62651be9792d2ced2fad48f8360952f8288e9 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 17:51:51 +0000 Subject: [PATCH 06/14] Delete obsolete `st2.prod.conf`, a mammoth skeleton of pre virtualenv-packaging era --- conf/st2.prod.conf | 84 ---------------------------------------------- st2common/Makefile | 45 ------------------------- 2 files changed, 129 deletions(-) delete mode 100644 conf/st2.prod.conf diff --git a/conf/st2.prod.conf b/conf/st2.prod.conf deleted file mode 100644 index 39d72a5f66..0000000000 --- a/conf/st2.prod.conf +++ /dev/null @@ -1,84 +0,0 @@ -# System-wide configuration - -[api] -# Host and port to bind the API server. -host = 127.0.0.1 -port = 9101 -logging = /etc/st2api/logging.conf -mask_secrets = True -# allow_origin is required for handling CORS in st2 web UI. -# allow_origin = http://myhost1.example.com:3000,http://myhost2.example.com:3000 - -[stream] -logging = /etc/st2stream/logging.conf - -[sensorcontainer] -logging = /etc/st2reactor/logging.sensorcontainer.conf - -[rulesengine] -logging = /etc/st2reactor/logging.rulesengine.conf - -[actionrunner] -logging = /etc/st2actions/logging.conf - -[auth] -host = 127.0.0.1 -port = 9100 -use_ssl = False -debug = False -enable = True -logging = /etc/st2auth/logging.conf - -mode = proxy - -# Note: Settings below are only used in "standalone" mode -backend = flat_file -backend_kwargs = - -# Base URL to the API endpoint excluding the version (e.g. http://myhost.net:9101/) -api_url = - -[garbagecollector] -logging = /etc/st2reactor/logging.garbagecollector.conf - -[system] -base_path = /opt/stackstorm - -[syslog] -host = 127.0.0.1 -port = 514 -facility = local7 -protocol = udp - -[webui] -# webui_base_url = https://mywebhost.domain - -[log] -excludes = requests,paramiko -redirect_stderr = False -mask_secrets = True - -[system_user] -user = stanley -ssh_key_file = /home/stanley/.ssh/stanley_rsa - -[messaging] -url = amqp://guest:guest@127.0.0.1:5672/ - -[ssh_runner] -remote_dir = /tmp - -[resultstracker] -logging = /etc/st2actions/logging.resultstracker.conf - -[notifier] -logging = /etc/st2actions/logging.notifier.conf - -[timersengine] -logging = /etc/st2timersengine/logging.st2timersengine.conf - -[workflow_engine] -logging = /etc/st2actions/logging.workflowengine.conf - -[scheduler] -logging = /etc/st2actions/logging.scheduler.conf diff --git a/st2common/Makefile b/st2common/Makefile index ab54ade247..e72dd06993 100644 --- a/st2common/Makefile +++ b/st2common/Makefile @@ -1,48 +1,3 @@ -# <<<< TO DEPRICATE -SHELL := /bin/bash -RPM_ROOT=~/rpmbuild -RPM_SOURCES_DIR := $(RPM_ROOT)/SOURCES/ -RPM_SPECS_DIR := $(RPM_ROOT)/SPECS/ -VER=0.4.0 - -COMPONENTS := st2common - -.PHONY: rpm -rpm: - pushd ~ && rpmdev-setuptree && popd - mkdir -p st2 && cp -f ../conf/st2.prod.conf st2/st2.conf - mkdir -p logrotate.d && cp -f ../conf/logrotate.conf logrotate.d/st2.conf - mkdir -p rbac/roles && cp -f ../st2tests/st2tests/fixtures/rbac/roles/role_sample.yaml rbac/roles/sample.yaml - mkdir -p rbac/assignments && cp -f ../st2tests/st2tests/fixtures/rbac/assignments/user_sample.yaml rbac/assignments/sample.yaml - sed -i '/\[actionrunner\]/a python_binary = /usr/bin/python2.7' st2/st2.conf - tar --transform=s~^~$(COMPONENTS)-$(VER)/~ --exclude=correlation -czf $(RPM_SOURCES_DIR)/$(COMPONENTS).tar.gz bin st2 logrotate.d rbac $(COMPONENTS) ../contrib ../tools/ ../requirements.txt - cp packaging/rpm/$(COMPONENTS).spec $(RPM_SPECS_DIR)/ - cd $(RPM_SPECS_DIR) && rpmbuild --clean --rmsource -ba $(COMPONENTS).spec - -.PHONY: rhel-rpm -rhel-rpm: - pushd ~ && rpmdev-setuptree && popd - mkdir -p st2 && cp -f ../conf/st2.prod.conf st2/st2.conf - mkdir -p logrotate.d && cp -f ../conf/logrotate.conf logrotate.d/st2.conf - mkdir -p rbac/roles && cp -f ../st2tests/st2tests/fixtures/rbac/roles/role_sample.yaml rbac/roles/sample.yaml - mkdir -p rbac/assignments && cp -f ../st2tests/st2tests/fixtures/rbac/assignments/user_sample.yaml rbac/assignments/sample.yaml - sed -i '/\[actionrunner\]/a python_binary = /usr/bin/python2.7' st2/st2.conf - tar --transform=s~^~$(COMPONENTS)-$(VER)/~ --exclude=correlation -czf $(RPM_SOURCES_DIR)/$(COMPONENTS).tar.gz bin st2 logrotate.d rbac $(COMPONENTS) ../contrib ../tools/ ../requirements.txt - cp packaging/rpm/$(COMPONENTS)-rhel6.spec $(RPM_SPECS_DIR)/ - cd $(RPM_SPECS_DIR) && rpmbuild --clean --rmsource -ba $(COMPONENTS)-rhel6.spec - -.PHONY: deb -deb: - mkdir -p ~/debbuild - mkdir -p st2 && cp -f ../conf/st2.prod.conf st2/st2.conf - mkdir -p logrotate.d && cp -f ../conf/logrotate.conf logrotate.d/st2.conf - mkdir -p rbac/roles && cp -f ../st2tests/st2tests/fixtures/rbac/roles/role_sample.yaml rbac/roles/sample.yaml - mkdir -p rbac/assignments && cp -f ../st2tests/st2tests/fixtures/rbac/assignments/user_sample.yaml rbac/assignments/sample.yaml - tar --transform=s~^~$(COMPONENTS)-$(VER)/~ --exclude=correlation -czf ~/$(COMPONENTS).tar.gz bin st2 logrotate.d rbac $(COMPONENTS) ../contrib ../tools/ ../requirements.txt packaging/debian - pushd ~ && tar -xzf $(COMPONENTS).tar.gz && cd $(COMPONENTS)-$(VER) && cp -Rf packaging/debian ./ && dpkg-buildpackage -us -uc -b && popd - cp -f ~/$(COMPONENT)*.deb ~/debbuild/ -# >>>> - WHEELDIR ?= /tmp/wheelhouse ST2_COMPONENT := $(notdir $(CURDIR)) ST2PKG_RELEASE ?= 1 From 4d6df63f9dbc6cf9491ea91e4257bd2d95a5ebee Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 17:55:12 +0000 Subject: [PATCH 07/14] Prod-friendly logging config path for st2auth --- conf/st2.conf.sample | 2 +- st2auth/st2auth/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index 65b76c2cac..eb8dee3168 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -50,7 +50,7 @@ port = 9101 # Enable authentication middleware. enable = True # Path to the logging config. -logging = conf/logging.conf +logging = /etc/st2/logging.auth.conf # Base URL to the API endpoint excluding the version api_url = None # Service token ttl in seconds. diff --git a/st2auth/st2auth/config.py b/st2auth/st2auth/config.py index 34daedbf7d..0f810a710f 100644 --- a/st2auth/st2auth/config.py +++ b/st2auth/st2auth/config.py @@ -63,7 +63,7 @@ def _register_app_opts(): 'key', default='/etc/apache2/ssl/mycert.key', help='Path to the SSL private key file. Only used when "use_ssl" is specified.'), cfg.StrOpt( - 'logging', default='conf/logging.conf', + 'logging', default='/etc/st2/logging.auth.conf', help='Path to the logging config.'), cfg.BoolOpt( 'debug', default=False, From d9a4549d9ecf7022c1d776f4a2f2a29ea454b506 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 18:26:31 +0000 Subject: [PATCH 08/14] Prod-friendly logging config path for st2sensorcontainer --- conf/st2.conf.sample | 2 +- st2reactor/st2reactor/sensor/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index eb8dee3168..5d12866a4e 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -268,7 +268,7 @@ partition_provider = {'name': 'default'} # Run in a single sensor mode where parent process exits when a sensor crashes / dies. This is useful in environments where partitioning, sensor process life cycle and failover is handled by a 3rd party service such as kubernetes. single_sensor_mode = False # location of the logging.conf file -logging = conf/logging.sensorcontainer.conf +logging = /etc/st2/logging.sensorcontainer.conf # name of the sensor node. sensor_node_name = sensornode1 diff --git a/st2reactor/st2reactor/sensor/config.py b/st2reactor/st2reactor/sensor/config.py index 90d9d5e974..21adb29e2b 100644 --- a/st2reactor/st2reactor/sensor/config.py +++ b/st2reactor/st2reactor/sensor/config.py @@ -46,7 +46,7 @@ def _register_common_opts(ignore_errors=False): def _register_sensor_container_opts(ignore_errors=False): logging_opts = [ cfg.StrOpt( - 'logging', default='conf/logging.sensorcontainer.conf', + 'logging', default='/etc/st2/logging.sensorcontainer.conf', help='location of the logging.conf file') ] From a52a5d26053dbc99392974062ac6c1f30bbbd3b3 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 18:35:32 +0000 Subject: [PATCH 09/14] Prod-friendly logging config path for st2rulesengine --- conf/st2.conf.sample | 2 +- st2reactor/st2reactor/rules/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index 5d12866a4e..3491b24ec6 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -246,7 +246,7 @@ thread_pool_size = 10 [rulesengine] # Location of the logging configuration file. -logging = conf/logging.rulesengine.conf +logging = /etc/st2/logging.rulesengine.conf [scheduler] # The frequency for rescheduling action executions. diff --git a/st2reactor/st2reactor/rules/config.py b/st2reactor/st2reactor/rules/config.py index 767490540f..5750bbac07 100644 --- a/st2reactor/st2reactor/rules/config.py +++ b/st2reactor/st2reactor/rules/config.py @@ -47,7 +47,7 @@ def _register_common_opts(): def _register_rules_engine_opts(): logging_opts = [ cfg.StrOpt( - 'logging', default='conf/logging.rulesengine.conf', + 'logging', default='/etc/st2/logging.rulesengine.conf', help='Location of the logging configuration file.') ] From 52ea4959f9df7227da051d3dc36bf02ee203b795 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 18:38:52 +0000 Subject: [PATCH 10/14] Prod-friendly logging config path for st2actionrunner --- conf/st2.conf.sample | 2 +- st2common/st2common/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index 3491b24ec6..d31bea58a7 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -19,7 +19,7 @@ virtualenv_binary = /usr/bin/virtualenv # Python 3 binary which will be used by Python actions for packs which use Python 3 virtual environment python3_binary = /usr/bin/python3 # location of the logging.conf file -logging = conf/logging.conf +logging = /etc/st2/logging.actionrunner.conf # True to store and stream action output (stdout and stderr) in real-time. stream_output = True # List of virtualenv options to be passsed to "virtualenv" command that creates pack virtualenv. diff --git a/st2common/st2common/config.py b/st2common/st2common/config.py index fb5b96c11a..85a6be2c60 100644 --- a/st2common/st2common/config.py +++ b/st2common/st2common/config.py @@ -325,7 +325,7 @@ def register_opts(ignore_errors=False): action_runner_opts = [ # Common runner options cfg.StrOpt( - 'logging', default='conf/logging.conf', + 'logging', default='/etc/st2/logging.actionrunner.conf', help='location of the logging.conf file'), # Python runner options From 65e2d89fc723dea4ac9c5d81165afb9c19606384 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 18:39:57 +0000 Subject: [PATCH 11/14] Prod-friendly logging config path for st2resultstracker --- conf/st2.conf.sample | 2 +- st2actions/st2actions/resultstracker/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index d31bea58a7..ae7d901a99 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -238,7 +238,7 @@ query_interval = 5 # Sleep delay in between queries when query queue is empty. empty_q_sleep_time = 1 # Location of the logging configuration file. -logging = conf/logging.resultstracker.conf +logging = /etc/st2/logging.resultstracker.conf # Sleep delay for query when there is no more worker in pool. no_workers_sleep_time = 1 # Number of threads to use to query external workflow systems. diff --git a/st2actions/st2actions/resultstracker/config.py b/st2actions/st2actions/resultstracker/config.py index 34ef04c04d..e2e74aa22d 100644 --- a/st2actions/st2actions/resultstracker/config.py +++ b/st2actions/st2actions/resultstracker/config.py @@ -47,7 +47,7 @@ def _register_common_opts(): def _register_results_tracker_opts(): resultstracker_opts = [ cfg.StrOpt( - 'logging', default='conf/logging.resultstracker.conf', + 'logging', default='/etc/st2/logging.resultstracker.conf', help='Location of the logging configuration file.') ] From b0ebb95725bee254eef7547e8c8148a54545ed88 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 18:42:01 +0000 Subject: [PATCH 12/14] Prod-friendly logging config path for st2notifier --- conf/st2.conf.sample | 2 +- st2actions/st2actions/notifier/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index ae7d901a99..74b108657f 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -226,7 +226,7 @@ retry_exp_max_msec = 300000 [notifier] # Location of the logging configuration file. -logging = conf/logging.notifier.conf +logging = /etc/st2/logging.notifier.conf [packs] # Enable/Disable support for pack common libs. Setting this config to ``True`` would allow you to place common library code for sensors and actions in lib/ folder in packs and use them in python sensors and actions. See https://docs.stackstorm.com/reference/sharing_code_sensors_actions.html for details. diff --git a/st2actions/st2actions/notifier/config.py b/st2actions/st2actions/notifier/config.py index 7e107caf4e..7d727e9732 100644 --- a/st2actions/st2actions/notifier/config.py +++ b/st2actions/st2actions/notifier/config.py @@ -47,7 +47,7 @@ def _register_common_opts(): def _register_notifier_opts(): notifier_opts = [ cfg.StrOpt( - 'logging', default='conf/logging.notifier.conf', + 'logging', default='/etc/st2/logging.notifier.conf', help='Location of the logging configuration file.') ] From 76e0f5ae424e6aeaa994feb146cfbb039799744e Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 18:43:10 +0000 Subject: [PATCH 13/14] Prod-friendly logging config path for st2exporter --- conf/st2.conf.sample | 2 +- st2exporter/st2exporter/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index 74b108657f..9b9af8c6f4 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -138,7 +138,7 @@ port = 27017 [exporter] # location of the logging.exporter.conf file -logging = conf/logging.exporter.conf +logging = /etc/st2/logging.exporter.conf # Directory to dump data to. dump_dir = /opt/stackstorm/exports/ diff --git a/st2exporter/st2exporter/config.py b/st2exporter/st2exporter/config.py index a716df66f7..84a70debb6 100644 --- a/st2exporter/st2exporter/config.py +++ b/st2exporter/st2exporter/config.py @@ -59,7 +59,7 @@ def _register_app_opts(): logging_opts = [ cfg.StrOpt( - 'logging', default='conf/logging.exporter.conf', + 'logging', default='/etc/st2/logging.exporter.conf', help='location of the logging.exporter.conf file') ] From bef5084ca8fc55b6ff371e97098d2e56021a1208 Mon Sep 17 00:00:00 2001 From: armab Date: Mon, 29 Oct 2018 18:44:08 +0000 Subject: [PATCH 14/14] Prod-friendly logging config path for st2garbagecollector --- conf/st2.conf.sample | 2 +- st2reactor/st2reactor/garbage_collector/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/st2.conf.sample b/conf/st2.conf.sample index 9b9af8c6f4..bc21be5182 100644 --- a/conf/st2.conf.sample +++ b/conf/st2.conf.sample @@ -148,7 +148,7 @@ action_executions_ttl = None # Trigger instances older than this value (days) will be automatically deleted. trigger_instances_ttl = None # Location of the logging configuration file. -logging = conf/logging.garbagecollector.conf +logging = /etc/st2/logging.garbagecollector.conf # How long to wait / sleep (in seconds) between collection of different object types. sleep_delay = 2 # Set to True to perform garbage collection on Inquiries (based on the TTL value per Inquiry) diff --git a/st2reactor/st2reactor/garbage_collector/config.py b/st2reactor/st2reactor/garbage_collector/config.py index 15de54bfa8..3aff4eec0f 100644 --- a/st2reactor/st2reactor/garbage_collector/config.py +++ b/st2reactor/st2reactor/garbage_collector/config.py @@ -49,7 +49,7 @@ def _register_common_opts(): def _register_garbage_collector_opts(): logging_opts = [ cfg.StrOpt( - 'logging', default='conf/logging.garbagecollector.conf', + 'logging', default='/etc/st2/logging.garbagecollector.conf', help='Location of the logging configuration file.') ]