This is an automated email from the ASF dual-hosted git repository. xuyang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new eeb706a3020 [chore](multi catalog) Improve network interface detection in Hive container script (#35089) eeb706a3020 is described below commit eeb706a302014515fa36be8377f79f703f0d8ba0 Author: xy720 <22125576+xy...@users.noreply.github.com> AuthorDate: Thu May 30 14:34:07 2024 +0800 [chore](multi catalog) Improve network interface detection in Hive container script (#35089) Improved the network interface detection logic in the run container script to better support systems with multiple network interfaces (such as eth0, eth1, etc.). --- docker/thirdparties/run-thirdparties-docker.sh | 13 +++++++------ regression-test/conf/regression-conf.groovy | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docker/thirdparties/run-thirdparties-docker.sh b/docker/thirdparties/run-thirdparties-docker.sh index 3b9d259eec8..a921294b612 100755 --- a/docker/thirdparties/run-thirdparties-docker.sh +++ b/docker/thirdparties/run-thirdparties-docker.sh @@ -276,8 +276,8 @@ fi if [[ "${RUN_KAFKA}" -eq 1 ]]; then # kafka KAFKA_CONTAINER_ID="${CONTAINER_UID}kafka" - eth0_num=$(ifconfig -a|grep flags=|grep -n ^eth0|awk -F ':' '{print $1}') - IP_HOST=$(ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|tail -n +${eth0_num}|head -n 1) + eth_name=$(ifconfig -a|grep -E "^eth[0-9]"|sort -k1.4n|awk -F ':' '{print $1}'|head -n 1) + IP_HOST=$(ifconfig "${eth_name}"|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|head -n 1) cp "${ROOT}"/docker-compose/kafka/kafka.yaml.tpl "${ROOT}"/docker-compose/kafka/kafka.yaml sed -i "s/doris--/${CONTAINER_UID}/g" "${ROOT}"/docker-compose/kafka/kafka.yaml sed -i "s/localhost/${IP_HOST}/g" "${ROOT}"/docker-compose/kafka/kafka.yaml @@ -309,8 +309,9 @@ if [[ "${RUN_HIVE2}" -eq 1 ]]; then # If the doris cluster you need to test is single-node, you can use the default values; If the doris cluster you need to test is composed of multiple nodes, then you need to set the IP_HOST according to the actual situation of your machine #default value IP_HOST="127.0.0.1" - eth0_num=$(ifconfig -a|grep flags=|grep -n ^eth0|awk -F ':' '{print $1}') - IP_HOST=$(ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|tail -n +${eth0_num}|head -n 1) + eth_name=$(ifconfig -a|grep -E "^eth[0-9]"|sort -k1.4n|awk -F ':' '{print $1}'|head -n 1) + IP_HOST=$(ifconfig "${eth_name}"|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|head -n 1) + if [ "_${IP_HOST}" == "_" ];then echo "please set IP_HOST according to your actual situation" exit -1 @@ -335,8 +336,8 @@ if [[ "${RUN_HIVE3}" -eq 1 ]]; then # If the doris cluster you need to test is single-node, you can use the default values; If the doris cluster you need to test is composed of multiple nodes, then you need to set the IP_HOST according to the actual situation of your machine #default value IP_HOST="127.0.0.1" - eth0_num=$(ifconfig -a|grep flags=|grep -n ^eth0|awk -F ':' '{print $1}') - IP_HOST=$(ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|tail -n +${eth0_num}|head -n 1) + eth_name=$(ifconfig -a|grep -E "^eth[0-9]"|sort -k1.4n|awk -F ':' '{print $1}'|head -n 1) + IP_HOST=$(ifconfig "${eth_name}"|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|head -n 1) if [ "_${IP_HOST}" == "_" ];then echo "please set IP_HOST according to your actual situation" exit -1 diff --git a/regression-test/conf/regression-conf.groovy b/regression-test/conf/regression-conf.groovy index 4feed947032..188b0494866 100644 --- a/regression-test/conf/regression-conf.groovy +++ b/regression-test/conf/regression-conf.groovy @@ -108,7 +108,7 @@ sk="" // jdbc connector test config // To enable jdbc test, you need first start mysql/pg container. -// See `docker/thirdparties/start-thirdparties-docker.sh` +// See `docker/thirdparties/run-thirdparties-docker.sh` enableJdbcTest=false mysql_57_port=3316 pg_14_port=5442 @@ -121,7 +121,7 @@ db2_11_port=50000 // hive catalog test config // To enable hive/paimon test, you need first start hive container. -// See `docker/thirdparties/start-thirdparties-docker.sh` +// See `docker/thirdparties/run-thirdparties-docker.sh` enableHiveTest=false enablePaimonTest=false @@ -139,12 +139,12 @@ hive3PgPort=5732 // kafka test config // to enable kafka test, you need firstly to start kafka container -// See `docker/thirdparties/start-thirdparties-docker.sh` +// See `docker/thirdparties/run-thirdparties-docker.sh` enableKafkaTest=false kafka_port=19193 // elasticsearch catalog test config -// See `docker/thirdparties/start-thirdparties-docker.sh` +// See `docker/thirdparties/run-thirdparties-docker.sh` enableEsTest=false es_5_port=59200 es_6_port=19200 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org