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

adonisling pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new d6a155bb339 [fix](deploy) K8s deploy manager cannot get group host 
info by endpoint (#27813) (#30055)
d6a155bb339 is described below

commit d6a155bb339f1b3c842b1f9f164dda08651fa5e6
Author: zxealous <zhouchang...@baidu.com>
AuthorDate: Fri Jan 19 10:19:20 2024 +0800

    [fix](deploy) K8s deploy manager cannot get group host info by endpoint 
(#27813) (#30055)
    
    cherry-pick #27813 from master
    
    K8s deploy manager cannot get group host info by endpoint. If we get group 
host info by endpoint, there is no need to init statefulset.
---
 .../apache/doris/deploy/impl/K8sDeployManager.java | 28 ++++++++++++----------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/deploy/impl/K8sDeployManager.java 
b/fe/fe-core/src/main/java/org/apache/doris/deploy/impl/K8sDeployManager.java
index 5a182e8a6a3..ee10a900734 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/deploy/impl/K8sDeployManager.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/deploy/impl/K8sDeployManager.java
@@ -117,20 +117,22 @@ public class K8sDeployManager extends DeployManager {
 
         LOG.info("use domainLTD: {}", domainLTD);
 
-        //Fill NodeTypeAttr.subAttr1 with statefulName
-        //If serviceName is configured, the corresponding statefulSetName must 
be configured
-        for (NodeType nodeType : NodeType.values()) {
-            NodeTypeAttr nodeTypeAttr = nodeTypeAttrMap.get(nodeType);
-            if (nodeTypeAttr.hasService()) {
-                String statefulSetEnvName = getStatefulSetEnvName(nodeType);
-                Log.info("Env name of: {} is: {}", nodeType.name(), 
statefulSetEnvName);
-                String statefulSetName = 
Strings.nullToEmpty(System.getenv(statefulSetEnvName));
-                if (Strings.isNullOrEmpty(statefulSetName)) {
-                    LOG.error("failed to init statefulSetName: {}", 
statefulSetEnvName);
-                    System.exit(-1);
+        if (Config.enable_fqdn_mode) {
+            //Fill NodeTypeAttr.subAttr1 with statefulName
+            //If serviceName is configured, the corresponding statefulSetName 
must be configured
+            for (NodeType nodeType : NodeType.values()) {
+                NodeTypeAttr nodeTypeAttr = nodeTypeAttrMap.get(nodeType);
+                if (nodeTypeAttr.hasService()) {
+                    String statefulSetEnvName = 
getStatefulSetEnvName(nodeType);
+                    Log.info("Env name of: {} is: {}", nodeType.name(), 
statefulSetEnvName);
+                    String statefulSetName = 
Strings.nullToEmpty(System.getenv(statefulSetEnvName));
+                    if (Strings.isNullOrEmpty(statefulSetName)) {
+                        LOG.error("failed to init statefulSetName: {}", 
statefulSetEnvName);
+                        System.exit(-1);
+                    }
+                    LOG.info("use statefulSetName: {}, {}", nodeType.name(), 
statefulSetName);
+                    nodeTypeAttr.setSubAttr(statefulSetName);
                 }
-                LOG.info("use statefulSetName: {}, {}", nodeType.name(), 
statefulSetName);
-                nodeTypeAttr.setSubAttr(statefulSetName);
             }
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to