Skip to content

Commit

Permalink
Allow claim sparse device
Browse files Browse the repository at this point in the history
Signed-off-by: Nobi <[email protected]>
  • Loading branch information
nobiit committed Sep 25, 2022
1 parent 6863cc2 commit 128de36
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/select/blockdevice/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ func (c *Config) getCandidateDevices(bdList *apis.BlockDeviceList) (*apis.BlockD
FilterBlockDeviceName,
)
} else {
if c.ClaimSpec.DeviceType != "sparse" {
// Unless explicitly specify DeviceType as sparse, device sparse will not be included
filterKeys = append(filterKeys, FilterOutSparseBlockDevices)
}

filterKeys = append(filterKeys,
// Sparse BDs can be claimed only by manual selection. Therefore, all
// sparse BDs will be filtered out in auto mode
FilterOutSparseBlockDevices,
FilterDeviceType,
FilterVolumeMode,
FilterNodeName,
Expand Down

0 comments on commit 128de36

Please sign in to comment.