Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 7d1c674

Browse files
committed
#16: Adds improved logging output.
1 parent f619a25 commit 7d1c674

File tree

8 files changed

+11
-35
lines changed

8 files changed

+11
-35
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ CentOS-7 7.5.1804 x86_64 - Redis 4.0.
1717
- Adds consideration for event lag into test cases for unhealthy health_status events.
1818
- Adds port incrementation to Makefile's run template for container names with an instance suffix.
1919
- Adds docker-compose configuration example.
20+
- Adds improved logging output.
2021
- Removes use of `/etc/services-config` paths.
2122
- Removes X-Fleet section from etcd register template unit-file.
2223
- Removes the unused group element from the default container name.
2324
- Removes the node element from the default container name.
2425
- Removes unused environment variables from Makefile and scmi configuration.
26+
- Removes container log file `/var/log/redis-server-bootstrap` and `/var/log/redis/redis.log`.
2527

2628
### 2.0.1 - 2018-11-19
2729

environment.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ NO_CACHE ?= false
3333
DIST_PATH ?= ./dist
3434

3535
# Number of seconds expected to complete container startup including bootstrap.
36-
STARTUP_TIME ?= 2
36+
STARTUP_TIME ?= 1
3737

3838
# ------------------------------------------------------------------------------
3939
# Application container configuration

src/etc/supervisord.d/redis-server-bootstrap.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ startsecs = 0
66
startretries = 0
77
autorestart = false
88
redirect_stderr = true
9-
stdout_logfile = /var/log/redis-server-bootstrap
10-
stdout_events_enabled = true
9+
stdout_logfile = /dev/stdout
10+
stdout_logfile_maxbytes = 0

src/etc/supervisord.d/redis-server-wrapper.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
priority = 100
33
command = /usr/sbin/redis-server-wrapper
44
autostart = %(ENV_REDIS_AUTOSTART_REDIS_WRAPPER)s
5-
startsecs = 1
5+
startsecs = 0
66
autorestart = true
77
redirect_stderr = true
8-
stdout_logfile = /var/log/redis/redis.log
9-
stdout_events_enabled = true
8+
stdout_logfile = /dev/stdout
9+
stdout_logfile_maxbytes = 0
1010
user = redis

src/opt/scmi/environment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NO_CACHE="${NO_CACHE:-false}"
2727
DIST_PATH="${DIST_PATH:-./dist}"
2828

2929
# Number of seconds expected to complete container startup including bootstrap.
30-
STARTUP_TIME="${STARTUP_TIME:-2}"
30+
STARTUP_TIME="${STARTUP_TIME:-1}"
3131

3232
# Docker --sysctl settings
3333
SYSCTL_NET_CORE_SOMAXCONN="${SYSCTL_NET_CORE_SOMAXCONN:-1024}"

src/opt/scmi/service-unit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ readonly SERVICE_UNIT_REGISTER_ENVIRONMENT_KEYS="
2727
# ------------------------------------------------------------------------------
2828
# Variables
2929
# ------------------------------------------------------------------------------
30-
SERVICE_UNIT_INSTALL_TIMEOUT="${SERVICE_UNIT_INSTALL_TIMEOUT:-5}"
30+
SERVICE_UNIT_INSTALL_TIMEOUT="${SERVICE_UNIT_INSTALL_TIMEOUT:-4}"

src/usr/sbin/redis-server-bootstrap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ set -e
44

55
readonly CONFIG_PATH="/etc/redis.conf"
66
readonly LOCK_FILE="/var/lock/subsys/redis-server-bootstrap"
7-
readonly LOG_FILE="/var/log/redis/redis.log"
8-
readonly OPTIONS="${REDIS_OPTIONS:-}"
97
readonly TIMER_START="$(
108
date +%s.%N
119
)"
@@ -33,26 +31,6 @@ function load_config ()
3331
fi
3432
}
3533

36-
function set_log_write_user ()
37-
{
38-
local file_path="${1:-}"
39-
local user="${2:-}"
40-
41-
if [[ ! -f ${file_path} ]]
42-
then
43-
touch \
44-
"${file_path}"
45-
fi
46-
47-
chown \
48-
"${user}":"${user}" \
49-
"${file_path}"
50-
51-
chmod \
52-
0660 \
53-
"${file_path}"
54-
}
55-
5634
function set_wrapper_execute_user ()
5735
{
5836
local file_path="${1:-}"
@@ -71,10 +49,6 @@ set_wrapper_execute_user \
7149
"${WRAPPER}" \
7250
"${USER}"
7351

74-
set_log_write_user \
75-
"${LOG_FILE}" \
76-
"${USER}"
77-
7852
load_config \
7953
"${CONFIG_PATH}"
8054

test/shpec/operation_shpec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
readonly STARTUP_TIME=2
1+
readonly STARTUP_TIME=1
22
readonly TEST_DIRECTORY="test"
33

44
# These should ideally be a static value but hosts might be using this port so

0 commit comments

Comments
 (0)