mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
rbd: removing TrimSpace from validateImageFeatures func
`imageFeatures` string containing just whitespace should also be treated as a invalid feature. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
84b046d736
commit
7fc553a3a7
@ -1017,7 +1017,7 @@ func (rv *rbdVolume) validateImageFeatures(imageFeatures string) error {
|
|||||||
// the Go split function would return a single item array with
|
// the Go split function would return a single item array with
|
||||||
// an empty string, causing a failure when trying to validate
|
// an empty string, causing a failure when trying to validate
|
||||||
// the features.
|
// the features.
|
||||||
if strings.TrimSpace(imageFeatures) == "" {
|
if imageFeatures == "" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
arr := strings.Split(imageFeatures, ",")
|
arr := strings.Split(imageFeatures, ",")
|
||||||
|
Loading…
Reference in New Issue
Block a user