Skip to content

Commit e810274

Browse files
committed
cinder-csi-plugin: Use correct key format
Signed-off-by: Stephen Finucane <[email protected]>
1 parent e13de2b commit e810274

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/csi/cinder/controllerserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
220220
return nil, status.Errorf(codes.InvalidArgument, "failed to resolve anti-affinity volume UUIDs: %v", err)
221221
}
222222

223-
volCtx = util.SetMapIfNotEmpty(volCtx, "affinity", affinity)
224-
volCtx = util.SetMapIfNotEmpty(volCtx, "anti-affinity", antiAffinity)
223+
volCtx[affinityKey] = affinity
224+
volCtx[antiAffinityKey] = antiAffinity
225225
schedulerHints = &volumes.SchedulerHintOpts{
226226
SameHost: util.SplitTrim(affinity, ','),
227227
DifferentHost: util.SplitTrim(antiAffinity, ','),

0 commit comments

Comments
 (0)