From 8c6ae10829deabdb6a8d49a4d46eb312fd829366 Mon Sep 17 00:00:00 2001 From: dove0012 Date: Tue, 29 Oct 2024 11:29:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?azure=20CA=E9=80=89=E6=9C=BA=E5=9E=8B?= =?UTF-8?q?=E5=BC=80=E6=94=BE=202c=20=E5=92=8C=204G=20=E7=9A=84=E6=9C=BA?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bcs-cluster-manager/internal/cloudprovider/azure/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bcs-services/bcs-cluster-manager/internal/cloudprovider/azure/node.go b/bcs-services/bcs-cluster-manager/internal/cloudprovider/azure/node.go index 5aa3c1a95e..cef27e0b3e 100644 --- a/bcs-services/bcs-cluster-manager/internal/cloudprovider/azure/node.go +++ b/bcs-services/bcs-cluster-manager/internal/cloudprovider/azure/node.go @@ -112,7 +112,7 @@ func (n *NodeManager) ListNodeInstanceType(info cloudprovider.InstanceInfo, opt } // filter cpu && mem - if cpu == 0 || mem == 0 || cpu < 4 || mem < 4 { + if cpu == 0 || mem == 0 || cpu < 2 || mem < 4 { continue } From e4bc78326e35d14f2baa8fff969d1555677f388a Mon Sep 17 00:00:00 2001 From: dove0012 Date: Tue, 29 Oct 2024 11:58:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgolangci-lint=E8=A7=84?= =?UTF-8?q?=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/actions/nodegroup/delete.go | 6 ++---- .../internal/cloudprovider/aws/tasks/updateDesiredNodes.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bcs-services/bcs-cluster-manager/internal/actions/nodegroup/delete.go b/bcs-services/bcs-cluster-manager/internal/actions/nodegroup/delete.go index bd16b271bb..00b61588a2 100644 --- a/bcs-services/bcs-cluster-manager/internal/actions/nodegroup/delete.go +++ b/bcs-services/bcs-cluster-manager/internal/actions/nodegroup/delete.go @@ -576,11 +576,9 @@ func (da *CleanNodesAction) getRelativeData() error { func (da *CleanNodesAction) updateCleanNodesStatus() error { // try to update Cluster & NodeGroup for _, node := range da.cleanNodes { - node.Status = common.StatusDeleting + var err error - var ( - err error - ) + node.Status = common.StatusDeleting // maybe update node timeout thus solve problem by retry err = retry.Do(func() error { if errLocal := da.model.UpdateNode(da.ctx, node); errLocal != nil { diff --git a/bcs-services/bcs-cluster-manager/internal/cloudprovider/aws/tasks/updateDesiredNodes.go b/bcs-services/bcs-cluster-manager/internal/cloudprovider/aws/tasks/updateDesiredNodes.go index 3ff34fea61..33b283eeb5 100644 --- a/bcs-services/bcs-cluster-manager/internal/cloudprovider/aws/tasks/updateDesiredNodes.go +++ b/bcs-services/bcs-cluster-manager/internal/cloudprovider/aws/tasks/updateDesiredNodes.go @@ -41,7 +41,7 @@ import ( ) // ApplyInstanceMachinesTask update desired nodes task -func ApplyInstanceMachinesTask(taskID string, stepName string) error { +func ApplyInstanceMachinesTask(taskID string, stepName string) error { // nolint start := time.Now() // get task and task current step