Jorgevillada opened a new issue, #24892:
URL: https://github.com/apache/doris/issues/24892

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.0.1
   
   ### What's Wrong?
   
   Script entry_point.sh in be is no ignoring FE health check with kubernetes
   
https://github.com/apache/doris/blob/master/docker/runtime/be/resource/entry_point.sh
   entry_point.sh
   ```sh
   _main() {
       docker_required_variables_env
       # get init args
       get_doris_args
       docker_setup_env
       # Start Doris BE
       {
           set +e
           bash init_be.sh 
       } &
       # check BE started status
       check_be_status
       if [ -z ${DATABASE_ALREADY_EXISTS} ]; then
           # run script
           sleep 15
           docker_process_init_files /docker-entrypoint-initdb.d/*
       fi
   
       # keep BE started status
       wait
       exec "$@"
   }
   ```
   after 300 retries, BE starts
   ```log
   2023-09-26T03:00:31+00:00 [Warn] [Entrypoint]: BUILD_TYPE k8s
   2023-09-26T03:00:31+00:00 [Note] [Entrypoint]: MASTER_FE_IP 
   2023-09-26T03:00:31+00:00 [Note] [Entrypoint]: CURRENT_BE_IP 
   2023-09-26T03:00:31+00:00 [Note] [Entrypoint]: CURRENT_BE_PORT 
   2023-09-26T03:00:31+00:00 [Note] [Entrypoint]: PRIORITY_NETWORKS ...0/24
   2023-09-26T03:00:31+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:00:51+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:01:11+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:01:31+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:01:51+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:02:12+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:02:32+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:02:52+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:03:12+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:03:33+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:03:53+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:04:13+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:04:33+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:04:53+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:05:14+00:00 [Note] [Entrypoint]: MASTER FE is not started. 
retry.
   2023-09-26T03:05:34+00:00 [Note] [Entrypoint]: BE is not register. retry.
   SLF4J: Class path contains multiple SLF4J bindings.
   ```
   
   
   ### What You Expected?
   
   behavior similar to init_be.sh (is already ignoring k8s healthchecks)
   ```sh
   _main() {
       trap 'cleanup' SIGTERM SIGINT
       if [[ $RUN_TYPE == "K8S" ]]; then
           start_be.sh &
           child_pid=$!
       else
           docker_setup_env
           if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
             add_priority_networks $PRIORITY_NETWORKS
             node_role_conf
             show_be_args
             register_be_to_fe
           fi
           check_be_status
           doris_note "Ready to start BE!"
           start_be.sh &
           child_pid=$!
       fi
       wait $child_pid
       exec "$@"
   }
   ```
   
   
   ### How to Reproduce?
   
   ```yaml
   apiVersion: apps/v1
   kind: StatefulSet
   metadata:
     name: apache-doris-be
     namespace: apache-doris
     labels:
       app: apache-doris-be
   spec:
     selector:
       matchLabels:
         app: apache-doris-be
     serviceName: apache-doris-be
     replicas: 1
     template:
       metadata:
         name: apache-doris-be
         labels:
           app: apache-doris-be
       spec:
         initContainers:
         - name: init-sysctl
           image: busybox
           command:
           - sysctl
           - -w
           - vm.max_map_count=2000000
           imagePullPolicy: IfNotPresent
           securityContext:
             privileged: true
         containers:
           - name: apache-doris-be
             #Need to change to real mirror information
             image: apache-doris-be:2.0.1 #private repository
             imagePullPolicy: IfNotPresent
             env:
               #Specify the startup type as k8s to bypass some restrictions of 
the official image initialization script
               - name: BUILD_TYPE
                 value: "k8s"
             ports:
               - containerPort: 9060
                 name: be-port
               - containerPort: 8040
                 name: webserver-port
               - containerPort: 9050
                 name: heartbeat-port
               - containerPort: 8060
                 name: brpc-port
             volumeMounts:
                 #Mount the configuration file in the way of configmap
               - name: conf
                 mountPath: /opt/apache-doris/be/conf
                 #Ifnot mounted, when enable_profile, error will be reported 
when querying the data from jdbc catalog
                 #Error message: error setting certificate verify locations: 
CAfile:/etc/pki/tls/certs/ca-bundle.crt CApath: none
               - name: sys
                 mountPath: /etc/pki
                 readOnly: true
         volumes:
           - name: conf
             configMap:
               name: be-conf
           - name: sys
             hostPath:
               path: /etc/pki
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to