You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/04/12 05:30:26 UTC
impala git commit: IMPALA-6837: allow multiple networks for distcc
server
Repository: impala
Updated Branches:
refs/heads/master 54f70b6d6 -> 15b388c5f
IMPALA-6837: allow multiple networks for distcc server
Testing:
Tested the script on Ubuntu 14.04 and CentOS 6 servers to confirm
that it resulted in a working configuration.
Change-Id: I6d49786b4f6e9c3bfab244e63620a62b2ae4dd64
Reviewed-on: http://gerrit.cloudera.org:8080/10029
Reviewed-by: Philip Zeyliger <ph...@cloudera.com>
Tested-by: Tim Armstrong <ta...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/15b388c5
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/15b388c5
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/15b388c5
Branch: refs/heads/master
Commit: 15b388c5f1b87d7f1ea57ee762208fab00d6997d
Parents: 54f70b6
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Wed Apr 11 17:30:39 2018 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Thu Apr 12 05:30:19 2018 +0000
----------------------------------------------------------------------
bin/distcc/distcc_server_setup.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/15b388c5/bin/distcc/distcc_server_setup.sh
----------------------------------------------------------------------
diff --git a/bin/distcc/distcc_server_setup.sh b/bin/distcc/distcc_server_setup.sh
index 893a82d..8b5e6a9 100755
--- a/bin/distcc/distcc_server_setup.sh
+++ b/bin/distcc/distcc_server_setup.sh
@@ -30,6 +30,10 @@
#
# sudo ./bin/distcc/distcc_server_setup.sh 172.16.0.0/12
#
+# Multiple networks can be allowed by providing a space-separated list:
+#
+# sudo ./bin/distcc/distcc_server_setup.sh "172.16.0.0/12 10.16.0.0/8"
+#
# Environment overrides:
# ---------------------
# CCACHE_DIR: directory to use for distccd's ccache.
@@ -97,9 +101,13 @@ export CCACHE_DIR=${CCACHE_DIR}
# END: Settings automatically generated by distcc_server_setup.sh
EOF
else
+ ALLOWED_NETS_ARGS=
+ for allowed_net in $ALLOWED_NETS; do
+ ALLOWED_NETS_ARGS+=" --allow ${allowed_net}"
+ done
cat << EOF >> /etc/sysconfig/distccd
# BEGIN: Settings automatically generated by distcc_server_setup.sh
-OPTIONS="--jobs $(($(nproc) * 2)) --allow ${ALLOWED_NETS} --log-level=warn --nice=-15"
+OPTIONS="--jobs $(($(nproc) * 2)) ${ALLOWED_NETS_ARGS} --log-level=warn --nice=-15"
# CCACHE_DIR is picked up by ccache from environment. CentOS 6 requires CCACHE_DIR to
# be exported while CentOS 7 seems to ignore the "export VAR=val" syntax.
CCACHE_DIR=${CCACHE_DIR}