Skip to content

Commit

Permalink
controller/reclaimspacejob: skip making node req if nodeID is empty
Browse files Browse the repository at this point in the history
Node reclaimspace request should not be made
when nodeID is empty indicating the pvc is
not mounted to any pod.

Signed-off-by: Rakshith R <[email protected]>
  • Loading branch information
Rakshith-R committed Jan 27, 2022
1 parent 9b6df29 commit c6f1071
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/reclaimspacejob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,11 @@ func (r *ReclaimSpaceJobReconciler) nodeReclaimSpace(
ctx context.Context,
logger *logr.Logger,
target *targetDetails) (bool, *int64, error) {
if target.nodeID == "" {
logger.Info("NodeID not found, skipping node reclaimspace")

return false, nil, nil
}
clientName, nodeClient := r.getRSClientWithCap(
target.driverName,
target.nodeID,
Expand Down

0 comments on commit c6f1071

Please sign in to comment.