summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-28 11:08:19 +0200
committerErich Eckner <git@eckner.net>2019-06-28 11:08:19 +0200
commitbab02966e03876106d6ca38e5fc8029a81bfb904 (patch)
treef7d69470cbacc43bcd11d0a8c7367b51b9ab8459
parent84e4cbd938163430f38b205273ac9fd48c16d918 (diff)
downloadbuilder-bab02966e03876106d6ca38e5fc8029a81bfb904.tar.xz
lib/load-configuration, bin/slave-build-connect: skip logging of all commands called by slave-build-connect -- they are already logged (with more information) in ssh_log
-rwxr-xr-xbin/slave-build-connect2
-rwxr-xr-xlib/load-configuration5
2 files changed, 4 insertions, 3 deletions
diff --git a/bin/slave-build-connect b/bin/slave-build-connect
index fa36219..5460b7e 100755
--- a/bin/slave-build-connect
+++ b/bin/slave-build-connect
@@ -62,7 +62,7 @@ if [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xget-assignment' ] || \
} | \
mysql_run_query 'unimportant'
- slave="$1" slave_id="${slave_id}" operator="${operator}" /bin/sh -c "${base_dir}/bin/${SSH_ORIGINAL_COMMAND}"
+ slave="$1" slave_id="${slave_id}" operator="${operator}" SKIP_COMMAND_LOG=1 /bin/sh -c "${base_dir}/bin/${SSH_ORIGINAL_COMMAND}"
else
diff --git a/lib/load-configuration b/lib/load-configuration
index 91a6db0..cdea48d 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -203,8 +203,8 @@ if ${i_am_the_master}; then
command="${0##*/}"
# these commands are useless to log
if [ "${command}" != 'ii-answer' ] && \
- [ "${command}" != 'ping-from-slave' ] && \
- [ "${command}" != 'slave-build-connect' ]; then
+ [ "${command}" != 'slave-build-connect' ] && \
+ [ "${SKIP_COMMAND_LOG}" != 1 ]; then
# shellcheck disable=SC2016
{
printf 'INSERT INTO `command_log`(`command`,`parameters`,`shell`)'
@@ -228,4 +228,5 @@ if ${i_am_the_master}; then
} | \
mysql_run_query 'unimportant'
fi
+ export SKIP_COMMAND_LOG=''
fi