Skip to content

Commit 294be34

Browse files
committed
trivial: Explain overloaded context term
This confused me. It might confuse others. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 5705a33 commit 294be34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/csi/cinder/controllerserver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
211211
if affinity != "" || antiAffinity != "" {
212212
klog.V(4).Infof("CreateVolume: Getting scheduler hints: affinity=%s, anti-affinity=%s", affinity, antiAffinity)
213213

214-
// resolve volume names to UUIDs
214+
// Resolve volume names to UUIDs
215215
affinity, err = cloud.ResolveVolumeListToUUIDs(ctx, affinity)
216216
if err != nil {
217217
return nil, status.Errorf(codes.InvalidArgument, "failed to resolve affinity volume UUIDs: %v", err)
@@ -221,6 +221,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
221221
return nil, status.Errorf(codes.InvalidArgument, "failed to resolve anti-affinity volume UUIDs: %v", err)
222222
}
223223

224+
// Note that this is context for the k8s CSI volume, not the Cinder volume
224225
volCtx = util.SetMapIfNotEmpty(volCtx, "affinity", affinity)
225226
volCtx = util.SetMapIfNotEmpty(volCtx, "anti-affinity", antiAffinity)
226227
schedulerHints = &volumes.SchedulerHintOpts{

0 commit comments

Comments
 (0)