Skip to content

Commit

Permalink
fix the issue that the node cannot be removed after ECS is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
chengxiangdong committed Aug 20, 2024
1 parent 0669a86 commit 721a461
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cloudprovider/huaweicloud/wrapper/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ func (e *EcsClient) GetByNodeName(name string) (*model.ServerDetail, error) {
return nil, err
}

notFound := fmt.Errorf("not found any ECS, node: %s, PrivateIP: %s", name, privateIP)
notFound := status.Errorf(codes.NotFound, "not found any ECS, node: %s, PrivateIP: %s", name, privateIP)
if rsp.Servers == nil || len(*rsp.Servers) == 0 {
klog.Errorf("not found any ECS, node: %s, PrivateIP: %s", name, privateIP)
return nil, notFound
}

Expand Down

0 comments on commit 721a461

Please sign in to comment.