rbd: remove topologyConstrainedPools parameter

This commit removes the `topologyConstrainedPools` parameter
from PV volumeAttributes as it is not required.

Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
Praveen M
2024-03-14 17:15:01 +05:30
committed by mergify[bot]
parent 9fb3743280
commit 3538b23794
5 changed files with 38 additions and 16 deletions

View File

@ -240,8 +240,7 @@ func (cs *ControllerServer) parseVolCreateRequest(
}
func buildCreateVolumeResponse(req *csi.CreateVolumeRequest, rbdVol *rbdVolume) *csi.CreateVolumeResponse {
// remove kubernetes csi prefixed parameters.
volumeContext := k8s.RemoveCSIPrefixedParameters(req.GetParameters())
volumeContext := util.GetVolumeContext(req.GetParameters())
volumeContext["pool"] = rbdVol.Pool
volumeContext["journalPool"] = rbdVol.JournalPool
volumeContext["imageName"] = rbdVol.RbdImageName

View File

@ -353,7 +353,6 @@ func attachRBDImage(ctx context.Context, volOptions *rbdVolume, device string, c
}
err = waitForrbdImage(ctx, backoff, volOptions)
if err != nil {
return "", err
}
@ -364,7 +363,7 @@ func attachRBDImage(ctx context.Context, volOptions *rbdVolume, device string, c
}
func appendNbdDeviceTypeAndOptions(cmdArgs []string, userOptions, cookie string) []string {
isUnmap := CheckSliceContains(cmdArgs, "unmap")
isUnmap := util.CheckSliceContains(cmdArgs, "unmap")
if !isUnmap {
if !strings.Contains(userOptions, useNbdNetlink) {
cmdArgs = append(cmdArgs, "--"+useNbdNetlink)

View File

@ -2071,17 +2071,6 @@ func getCephClientLogFileName(id, logDir, prefix string) string {
return fmt.Sprintf("%s/%s-%s.log", logDir, prefix, id)
}
// CheckSliceContains checks the slice for string.
func CheckSliceContains(options []string, opt string) bool {
for _, o := range options {
if o == opt {
return true
}
}
return false
}
// strategicActionOnLogFile act on log file based on cephLogStrategy.
func strategicActionOnLogFile(ctx context.Context, logStrategy, logFile string) {
var err error