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

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e744f12 [horus] Fixing and testing reboot strategies (#413)
4e744f12 is described below

commit 4e744f1253de092d9d8144e78f8ff76e417120ee
Author: mfordjody <[email protected]>
AuthorDate: Tue Oct 1 16:08:11 2024 +0800

    [horus] Fixing and testing reboot strategies (#413)
---
 app/horus/core/horuser/node_downtime.go | 5 +----
 app/horus/core/horuser/node_restart.go  | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/horus/core/horuser/node_downtime.go 
b/app/horus/core/horuser/node_downtime.go
index eea3bc2d..ff10a06c 100644
--- a/app/horus/core/horuser/node_downtime.go
+++ b/app/horus/core/horuser/node_downtime.go
@@ -128,9 +128,6 @@ func (h *Horuser) DownTimeNodes(clusterName, addr string) {
                        return
                }
                node, err := kubeClient.CoreV1().Nodes().Get(ctxFirst, 
nodeName, metav1.GetOptions{})
-               if err != nil {
-                       klog.Errorf("node Cordon get err nodeName:%v 
clusterName:%v", nodeName, clusterName)
-               }
                nodeIP, err := func() (string, error) {
                        for _, address := range node.Status.Addresses {
                                if address.Type == "InternalIP" {
@@ -152,7 +149,7 @@ func (h *Horuser) DownTimeNodes(clusterName, addr string) {
                }
                newfound++
                if newfound > 0 {
-                       klog.Infof("DownTimeNodes get WithDownNodeIPs 
\n【集群:%v】\n 【节点:%v】\n【节点数:%v】\n", clusterName, nodeName, len(nodeIP))
+                       klog.Infof("DownTimeNodes get 
WithDownNodeIPs【集群:%v】【节点:%v】【IP:%v】", clusterName, nodeName, nodeIP)
                        alert.DingTalkSend(h.cc.NodeDownTime.DingTalk, msg)
                }
                msg += fmt.Sprintf("node:%v ip:%v", nodeName, nodeIP)
diff --git a/app/horus/core/horuser/node_restart.go 
b/app/horus/core/horuser/node_restart.go
index 743ea7c0..63d828a8 100644
--- a/app/horus/core/horuser/node_restart.go
+++ b/app/horus/core/horuser/node_restart.go
@@ -77,5 +77,4 @@ func (h *Horuser) TryRestart(node db.NodeDataInfo) {
                }
                klog.Infof("Successfully executed restart.sh for node %v. 
Output: %v", node.NodeName, string(output))
        }
-       }
 }

Reply via email to