Skip to content

Commit 1e792f1

Browse files
authored
fix: update tenant status when pool removal is disallowed (#2486)
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
1 parent e054c34 commit 1e792f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/controller/decomission.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ func (c *Controller) checkForPoolDecommission(ctx context.Context, key string, t
7979
}
8080
if noDecomCommon {
8181
klog.Warningf("%s Detected we are removing a pool but spec.Pool[].Name's are duplicated - disallowing removal", key)
82+
if _, err = c.updateTenantStatus(ctx, tenant, StatusDecommissioningNotAllowed, 0); err != nil {
83+
return nil, err
84+
}
8285
return nil, errors.New("removing pool not allowed")
8386
}
8487

0 commit comments

Comments
 (0)