Skip to content

Commit

Permalink
Merge pull request #284 from sap-contributions/ensure-drain-log-dir-e…
Browse files Browse the repository at this point in the history
…xists

Ensure that the drain log dir exists
  • Loading branch information
philippthun authored Dec 2, 2022
2 parents b31b518 + 6ef303b commit 2e7e32b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jobs/cloud_controller_ng/templates/restart_drain.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ function on_exit {
trap on_exit EXIT
echo "$BASHPID" > "$PIDFILE"

LOGFILE="/var/vcap/sys/log/cloud_controller_ng/drain/restart_drain.log"
LOGPATH="/var/vcap/sys/log/cloud_controller_ng/drain"
mkdir -p "$LOGPATH"
LOGFILE="$LOGPATH/restart_drain.log"
echo "$(date) - pid: $BASHPID - Monit triggered shutdown drain" >> "$LOGFILE"

# Unmonitor cloud_controller_ng. This also unmonitors nginx_cc and
Expand Down

0 comments on commit 2e7e32b

Please sign in to comment.