Skip to content

Commit fed99be

Browse files
committed
add logging
1 parent 257a964 commit fed99be

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎pkg/csi/blockstorage/controllerserver.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
241241
// encryption from that source; IaaS sets it. We MUST never send EncryptionParameters
242242
// for such a restore. Only a fresh volume (i.e. without a source source) takes encryption parameters.
243243
if volParams.Encrypted != nil && volumeSourceType == "" {
244+
klog.V(1).Infof("CreateVolume: setting up encryption parameters, encrypted: %v", volParams.Encrypted)
244245
encrypted, err := strconv.ParseBool(*volParams.Encrypted)
245246
if err != nil {
246247
return nil, status.Error(codes.InvalidArgument, "parameter encrypted must be of type boolean")
@@ -250,6 +251,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
250251
return nil, status.Errorf(codes.InvalidArgument, "Failed to set volume encryption parameters: %v", err)
251252
}
252253
}
254+
} else {
255+
klog.V(4).Infof("CreateVolume: no encryption parameters for volume source type %v", volumeSourceType)
253256
}
254257

255258
vol, err := cloud.CreateVolume(ctx, *opts)

0 commit comments

Comments
 (0)