This is an automated email from the ASF dual-hosted git repository.

hellostephen 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 f0567be5bc3 [Enhancement][docker] entrypoint parse meta dir (#51693)
f0567be5bc3 is described below

commit f0567be5bc3799f52e90163c7a116d09b2b6314c
Author: smiletan <[email protected]>
AuthorDate: Thu Jun 19 14:53:07 2025 +0800

    [Enhancement][docker] entrypoint parse meta dir (#51693)
---
 docker/runtime/fe/resource/fe_entrypoint.sh | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/docker/runtime/fe/resource/fe_entrypoint.sh 
b/docker/runtime/fe/resource/fe_entrypoint.sh
index 83e41ab46aa..f31c8eccb7a 100755
--- a/docker/runtime/fe/resource/fe_entrypoint.sh
+++ b/docker/runtime/fe/resource/fe_entrypoint.sh
@@ -49,6 +49,8 @@ DB_ADMIN_USER=${USER:-"root"}
 DB_ADMIN_PASSWD=$PASSWD
 # myself as IP or FQDN
 MYSELF=
+# doris mtat storage path
+DORIS_META_DIR=
 
 function log_stderr()
 {
@@ -110,6 +112,13 @@ collect_env_info()
     if [[ "x$query_port" != "x" ]] ; then
         QUERY_PORT=$query_port
     fi
+
+    # parse meta_dir
+    local doris_meta_path=`parse_confval_from_fe_conf "meta_dir"`
+    if [[ "x$doris_meta_path" == "x" ]] ; then
+        doris_meta_path="/opt/apache-doris/fe/doris-meta"
+    fi
+    DORIS_META_DIR=$doris_meta_path
 }
 
 # get all registered fe in cluster.
@@ -395,8 +404,8 @@ start_fe_with_meta()
 # print the least 10 records of 'VLSN'. When fe failed to restart, user can 
select the fe of VLSN is the bigest to force restart.
 print_vlsn()
 {
-    local doirs_meta_path=`parse_confval_from_fe_conf "meta_dir"`
-    if [[ "x$doirs_meta_path" == "x" ]] ; then
+    local doris_meta_path=`parse_confval_from_fe_conf "meta_dir"`
+    if [[ "xdoris_meta_path" == "x" ]] ; then
         doris_meta_path="/opt/apache-doris/fe/doris-meta"
     fi
 
@@ -437,18 +446,21 @@ if [[ "x$fe_addrs" == "x" ]]; then
     exit
 fi
 
+#first upate config
 update_conf_from_configmap
+collect_env_info
 mount_kerberos_config
 # resolve password for root to manage nodes in doris.
 resolve_password_from_secret
-if [[ -f "/opt/apache-doris/fe/doris-meta/image/ROLE" ]]; then
+# if [[ -f "/opt/apache-doris/fe/doris-meta/image/ROLE" ]]; then
+doris_meta_dir=$(eval "echo \"$DORIS_META_DIR\"")
+if [[ -f "$doris_meta_dir/image/ROLE" ]]; then
     log_stderr "start fe with exist meta."
     ./doris-debug --component fe
     print_vlsn
     start_fe_with_meta
 else
     log_stderr "first start fe with meta not exist."
-    collect_env_info
     probe_master $fe_addrs
     #create account about node management
     create_account


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to