Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#2886] improvement(ci): optimize Docker container to suite CI framework (#2887)

Kang282d08248028
diff --git a/dev/docker/doris/start.sh b/dev/docker/doris/start.sh
index b0b84a826b..64971c88aa 100644
--- a/dev/docker/doris/start.sh
+++ b/dev/docker/doris/start.sh
@@ -21,7 +21,6 @@ DISK_FREE=`df -BG | grep '/$' | tr -s ' ' | cut -d ' ' -f4 | grep -o '[0-9]*'`
if [ "$DISK_FREE" -le "$THRESHOLD" ]
then
echo "ERROR: Doris FE (version < 2.1.0) can not start with less than ${THRESHOLD}G disk space."
- exit 1
fi
# comment a code snippet about max_map_count, it's not necessary for IT environment
@@ -37,6 +36,7 @@ PRIORITY_NETWORKS=$(echo "${CONTAINER_IP}" | awk -F '.' '{print$1"."$2"."$3".0/2
echo "add priority_networks = ${PRIORITY_NETWORKS} to fe.conf & be.conf"
echo "priority_networks = ${PRIORITY_NETWORKS}" >> ${DORIS_FE_HOME}/conf/fe.conf
echo "priority_networks = ${PRIORITY_NETWORKS}" >> ${DORIS_BE_HOME}/conf/be.conf
+echo "report_disk_state_interval_seconds = 10" >> ${DORIS_BE_HOME}/conf/be.conf
# start doris fe and be in daemon mode
${DORIS_FE_HOME}/bin/start_fe.sh --daemon
@@ -62,10 +62,7 @@ for i in {1..10}; do
done
if [ "$fe_started" = false ]; then
- echo "Doris fe failed to start"
-
- cat ${DORIS_FE_HOME}/log/fe.*
- exit 1
+ echo "ERROR: Doris fe failed to start"
fi
# check for be started
@@ -88,10 +85,7 @@ for i in {1..10}; do
done
if [ "$be_started" = false ]; then
- echo "Doris be failed to start"
-
- cat ${DORIS_BE_HOME}/log/*
- exit 1
+ echo "ERROR: Doris be failed to start"
fi
@@ -113,11 +107,8 @@ for i in {1..10}; do
done
if [ "$be_added" = false ]; then
- echo "Doris BE failed to add to FE"
- cat ${DORIS_FE_HOME}/log/fe.* ${DORIS_BE_HOME}/log/*
-
- exit 1
+ echo "ERROR: Doris BE failed to add to FE"
fi
# persist the container
-tail -f ${DORIS_FE_HOME}/log/fe.log ${DORIS_BE_HOME}/log/be.INFO
+tail -f /dev/null
diff --git a/docs/docker-image-details.md b/docs/docker-image-details.md
index 18baf35634..dfda8cfb6e 100644
--- a/docs/docker-image-details.md
+++ b/docs/docker-image-details.md
@@ -170,17 +170,21 @@ You can use this image to test Apache Doris.
Changelog
+- gravitino-ci-doris:0.1.3
+ - To adapt to the CI framework, don't exit container when start failed, logs are no longer printed to stdout.
+ - Add `report_disk_state_interval_seconds` config to decrease report interval.
+
- gravitino-ci-doris:0.1.2
- - Add a check for the status of Doris BE, add retry for adding BE nodes.
+ - Add a check for the status of Doris BE, add retry for adding BE nodes.
- gravitino-ci-doris:0.1.1
- - Optimize `start.sh`, add disk space check before starting Doris, exit when FE or BE start failed, add log to stdout
+ - Optimize `start.sh`, add disk space check before starting Doris, exit when FE or BE start failed, add log to stdout
- gravitino-ci-doris:0.1.0
- - Docker image `datastrato/gravitino-ci-doris:0.1.0`
- - Start Doris BE & FE in one container
- - Please set table properties `"replication_num" = "1"` when creating a table in Doris, because the default replication number is 3, but the Doris container only has one BE.
- - Username: `root`, Password: N/A (password is empty)
- - Expose ports:
- - `8030` Doris FE HTTP port
- - `9030` Doris FE MySQL server port
+ - Docker image `datastrato/gravitino-ci-doris:0.1.0`
+ - Start Doris BE & FE in one container
+ - Please set table properties `"replication_num" = "1"` when creating a table in Doris, because the default replication number is 3, but the Doris container only has one BE.
+ - Username: `root`, Password: N/A (password is empty)
+ - Expose ports:
+ - `8030` Doris FE HTTP port
+ - `9030` Doris FE MySQL server port