Skip to content

Commit 1288de8

Browse files
authored
Merge pull request #253 from chengxiangdong/fix
fix the issue that the node cannot be removed after ECS is deleted
2 parents 0669a86 + 721a461 commit 1288de8

File tree

1 file changed

+2
-1
lines changed
  • pkg/cloudprovider/huaweicloud/wrapper

1 file changed

+2
-1
lines changed

pkg/cloudprovider/huaweicloud/wrapper/ecs.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ func (e *EcsClient) GetByNodeName(name string) (*model.ServerDetail, error) {
7878
return nil, err
7979
}
8080

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

0 commit comments

Comments
 (0)