Add log file to tacker-server systemctl daemon script

In devstack tacker script, create /var/log/tacker dir,
then add --log-file parameter to systemctl srcipt.

Closes-bug: #1777622
Change-Id: I6ddec836159ed84d6ffad1a19384cca28c0b7c2d
This commit is contained in:
Yan Xing'an 2018-06-20 00:25:01 +08:00
parent f7c89a6d02
commit 7f60e64bd3
2 changed files with 10 additions and 1 deletions

View File

@ -52,6 +52,9 @@ fi
TACKER_CONF_DIR=/etc/tacker
TACKER_CONF=$TACKER_CONF_DIR/tacker.conf
TACKER_LOG_DIR=/var/log/tacker
TACKER_SERVER_LOG=$TACKER_LOG_DIR/tacker-server.log
# Default name for Tacker database
TACKER_DB_NAME=${TACKER_DB_NAME:-tacker}
# Default Tacker Port
@ -172,10 +175,16 @@ function _create_tacker_conf_dir {
sudo install -d -o $STACK_USER $TACKER_CONF_DIR
}
function _create_tacker_log_dir {
# Create Tacker LOG DIR
sudo install -d -o $STACK_USER $TACKER_LOG_DIR
}
# configure_tacker()
# Set common config for all tacker server and agents.
function configure_tacker {
_create_tacker_conf_dir
_create_tacker_log_dir
cd $TACKER_DIR
./tools/generate_config_file_sample.sh

View File

@ -6,7 +6,7 @@ ExecReload = /bin/kill -HUP $MAINPID
TimeoutStopSec = 300
KillMode = process
WorkingDirectory = /tmp
ExecStart=/usr/local/bin/tacker-server --config-file /etc/tacker/tacker.conf
ExecStart=/usr/local/bin/tacker-server --config-file /etc/tacker/tacker.conf --log-file /var/log/tacker-server.log
[Install]
WantedBy = multi-user.target