Skip to content

Commit

Permalink
Merge a8bb32d into 0476edc
Browse files Browse the repository at this point in the history
  • Loading branch information
gnufied committed Jun 2, 2021
2 parents 0476edc + a8bb32d commit 8e3e476
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,16 @@ func (d *controllerService) ControllerExpandVolume(ctx context.Context, req *csi
return nil, status.Errorf(codes.Internal, "Could not resize volume %q: %v", volumeID, err)
}

nodeExpansionRequired := true
// if this is a raw block device, no expansion should be necessary on the node
cap := req.GetVolumeCapability()
if cap != nil && cap.GetBlock() != nil {
nodeExpansionRequired = false
}

return &csi.ControllerExpandVolumeResponse{
CapacityBytes: util.GiBToBytes(actualSizeGiB),
NodeExpansionRequired: true,
NodeExpansionRequired: nodeExpansionRequired,
}, nil
}

Expand Down

0 comments on commit 8e3e476

Please sign in to comment.