Skip to content

Commit e7ee41f

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

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
@@ -214,7 +214,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
214214
if affinity != "" || antiAffinity != "" {
215215
klog.V(4).Infof("CreateVolume: Getting scheduler hints: affinity=%s, anti-affinity=%s", affinity, antiAffinity)
216216

217-
// resolve volume names to UUIDs
217+
// Resolve volume names to UUIDs
218218
affinity, err = cloud.ResolveVolumeListToUUIDs(ctx, affinity)
219219
if err != nil {
220220
return nil, status.Errorf(codes.InvalidArgument, "failed to resolve affinity volume UUIDs: %v", err)
@@ -224,6 +224,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
224224
return nil, status.Errorf(codes.InvalidArgument, "failed to resolve anti-affinity volume UUIDs: %v", err)
225225
}
226226

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

0 commit comments

Comments
 (0)