Skip to content

Commit

Permalink
scripts: Ensure even external scripts get tagged in logs as "ctdbd"
Browse files Browse the repository at this point in the history
Our practice is to search logs for "ctdbd:".  We want to make sure we
find everything.

Signed-off-by: Martin Schwenke <[email protected]>

(This used to be ctdb commit 5940a2494e9e43a83f2bca098bd04dfc1a8f2e93)
  • Loading branch information
martin-schwenke authored and amitay committed Apr 22, 2013
1 parent fb8be43 commit 823edbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ctdb/config/ctdb-crash-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ loadconfig ctdb
[ -f "$CTDB_PUBLIC_ADDRESSES" ] || \
die "No public addresses file found. Can't clean up."

drop_all_public_ips "ctdb-crash-cleanup"
drop_all_public_ips "ctdb-crash-cleanup.sh"

if [ -n "$CTDB_NATGW_PUBLIC_IP" ] ; then
drop_ip "$CTDB_NATGW_PUBLIC_IP" "ctdb-crash-cleanup"
drop_ip "$CTDB_NATGW_PUBLIC_IP" "ctdb-crash-cleanup.sh"
fi
2 changes: 1 addition & 1 deletion ctdb/config/ctdb.init
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ start() {

# make sure we drop any ips that might still be held if previous
# instance of ctdb got killed with -9 or similar
drop_all_public_ips
drop_all_public_ips "ctdb.init"

if select_tdb_checker ; then
check_persistent_databases || return $?
Expand Down
4 changes: 2 additions & 2 deletions ctdb/config/functions
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ script_log ()
esac

if $_using_syslog ; then
logger -t "$_tag" "$*"
logger -t "ctdbd" "${_tag}: $*"
else
{
if [ -n "$*" ] ; then
Expand All @@ -101,7 +101,7 @@ background_with_logging ()
{
(
"$@" 2>&1 </dev/null |
script_log "ctdbd: ${script_name}&"
script_log "${script_name}&"
)&

return 0
Expand Down

0 comments on commit 823edbf

Please sign in to comment.