Split log file of mistral services

Adding the option to configure different log files for
mistral services in order to have clearer log files
seperated to engine,api and executor

Change-Id: Ie1106e01206f7c618e5b2ed5a55666718b3e7ec8
Signed-off-by: tshtilma <tomer.shtilman@nokia.com>
This commit is contained in:
tshtilma 2016-01-20 12:20:05 +02:00
parent cdadf9cfa8
commit b18ff85e3f
5 changed files with 11 additions and 6 deletions

View File

@ -6,6 +6,8 @@ class mistral::params {
$mistral_conf_dir = '/etc/mistral'
$mistral_conf = "${mistral_conf_dir}/mistral.conf"
$mistral_log_dir='/var/log/mistral'
$service_log_file="${mistral_log_dir}/mistral-server.log"
$client_package = 'python-mistralclient'
$log_dir ='/var/log/mistral'
$db_sync_command = "mistral-db-manage --config-file=${mistral_conf} upgrade head"

View File

@ -16,13 +16,16 @@
# [*conf_file*]
# path to the conf file. Defaults '$::mistral::params::mistral_conf'
#
# [*log_file*]
# path to the service log file. Defaults '$::mistral::params::service_log_file'
#
class mistral::services(
$is_engine = true,
$is_api = true,
$is_executor = true,
$conf_file = $::mistral::params::mistral_conf
) {
$conf_file = $::mistral::params::mistral_conf,
$log_file = $::mistral::params::service_log_file
) inherits ::mistral::params {
if $is_engine {
notify { 'Start mistral-engine': }

View File

@ -6,7 +6,7 @@ After=syslog.target network.target
Type=simple
Restart=always
User=mistral
ExecStart=/usr/bin/python /usr/lib/python2.7/site-packages/mistral/cmd/launch.py --server api --config-file <%= @conf_file %>
ExecStart=/usr/bin/mistral-server --server api --config-file <%= @conf_file %> --log-file <%= @log_file %>
[Install]
WantedBy=multi-user.target

View File

@ -6,7 +6,7 @@ After=syslog.target network.target
Type=simple
Restart=always
User=mistral
ExecStart=/usr/bin/python /usr/lib/python2.7/site-packages/mistral/cmd/launch.py --server engine --config-file <%= @conf_file %>
ExecStart=/usr/bin/mistral-server --server engine --config-file <%= @conf_file %> --log-file <%= @log_file %>
[Install]
WantedBy=multi-user.target

View File

@ -6,7 +6,7 @@ After=syslog.target network.target
Type=simple
Restart=always
User=mistral
ExecStart=/usr/bin/python /usr/lib/python2.7/site-packages/mistral/cmd/launch.py --server executor --config-file <%= @conf_file %>
ExecStart=/usr/bin/mistral-server --server executor --config-file <%= @conf_file %> --log-file <%= @log_file %>
[Install]
WantedBy=multi-user.target