Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复eks缩容节点状态问题 #3486

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,14 @@ func (t *Task) BuildCleanNodesInGroupTask(nodes []*proto.Node, group *proto.Node
}

var (
nodeIPs, nodeIDs = make([]string, 0), make([]string, 0)
nodeIPs, nodeIDs, nodeNames = make([]string, 0), make([]string, 0), make([]string, 0)
)
for _, node := range nodes {
nodeIPs = append(nodeIPs, node.InnerIP)
nodeIDs = append(nodeIDs, node.NodeID)
if node.NodeName != "" {
nodeNames = append(nodeNames, node.NodeName)
}
}

nowStr := time.Now().Format(time.RFC3339)
Expand Down Expand Up @@ -497,7 +500,7 @@ func (t *Task) BuildCleanNodesInGroupTask(nodes []*proto.Node, group *proto.Node
// step3: cluster delete nodes
cleanNodes.BuildCleanNodeGroupNodesStep(task)
// step4: check deleted node status
common.BuildCheckClusterCleanNodesTaskStep(task, group.Provider, opt.Cluster.ClusterID, nodeIDs)
common.BuildCheckClusterCleanNodesTaskStep(task, group.Provider, opt.Cluster.ClusterID, nodeNames)

// step5: remove host from cmdb
common.BuildRemoveHostStep(task, opt.Cluster.BusinessID, nodeIPs)
Expand Down
Loading