Skip to content

Commit 99e80bb

Browse files
committed
Fix build failures
1 parent a42d3d3 commit 99e80bb

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

pkg/common/parameters_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ func TestExtractAndDefaultParameters(t *testing.T) {
366366
"key1": "value1",
367367
"key2": "value2",
368368
},
369+
ResourceTags: map[string]string{},
369370
},
370371
expectDataCacheParams: DataCacheParameters{
371372
DataCacheMode: DataCacheModeWriteThrough,
@@ -386,6 +387,7 @@ func TestExtractAndDefaultParameters(t *testing.T) {
386387
"key1": "value1",
387388
"key2": "value2",
388389
},
390+
ResourceTags: map[string]string{},
389391
},
390392
expectDataCacheParams: DataCacheParameters{
391393
DataCacheMode: DataCacheModeWriteBack,

pkg/gce-pd-csi-driver/cache.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func setupCaching(devicePath string, req *csi.NodeStageVolumeRequest, nodeId str
119119
if err != nil {
120120
return mainDevicePath, fmt.Errorf("lv list error %w: %s", err, info)
121121
}
122-
klog.Info("=============== Got LVs %s on Volume group %s ============", string(lvList), volumeGroupName)
122+
klog.Infof("=============== Got LVs %s on Volume group %s ============", string(lvList), volumeGroupName)
123123
if !strings.Contains(string(lvList), mainLvName) {
124124
// lvcreate -n main -l 100%PVS cachegroup /dev/sdb
125125
klog.V(2).Infof("====== lvcreate main cache layer ======")
@@ -287,7 +287,7 @@ func reduceVolumeGroup(volumeGroupName string, force bool) {
287287
func RaidLocalSsds() error {
288288
isAlreadyRaided, err := isRaided()
289289
if err != nil {
290-
klog.V(2).Info("======Errored while scanning for available LocalSSDs err:%v; continuing Raiding=======", err)
290+
klog.V(2).Infof("======Errored while scanning for available LocalSSDs err:%v; continuing Raiding=======", err)
291291
} else if isAlreadyRaided {
292292
klog.V(2).Infof("===============Local SSDs are already RAIDed==============")
293293
return nil
@@ -331,7 +331,7 @@ func RaidLocalSsds() error {
331331
// Validate if Raided successfully
332332
isAlreadyRaided, err = isRaided()
333333
if err != nil {
334-
klog.V(2).Info("======Errored while scanning for available raided LocalSSDs err:%v=======", err)
334+
klog.V(2).Infof("======Errored while scanning for available raided LocalSSDs err:%v=======", err)
335335
}
336336
if !isAlreadyRaided {
337337
return fmt.Errorf("failed raiding, raided device not found on scanning")

pkg/gce-pd-csi-driver/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func (gceCS *GCEControllerServer) CreateVolume(ctx context.Context, req *csi.Cre
315315
// Apply Parameters (case-insensitive). We leave validation of
316316
// the values to the cloud provider.
317317
params, dataCacheParams, err := common.ExtractAndDefaultParameters(req.GetParameters(), gceCS.Driver.name, gceCS.Driver.extraVolumeLabels, gceCS.enableStoragePools, gceCS.enableDataCache, gceCS.Driver.extraTags)
318-
klog.V(2).Infof("====== dataCacheParams are %v ======", dataCacheParams, gceCS.Driver.extraTags)
318+
klog.V(2).Infof("====== dataCacheParams are %v ======", dataCacheParams)
319319
diskTypeForMetric = params.DiskType
320320
enableConfidentialCompute = strconv.FormatBool(params.EnableConfidentialCompute)
321321
hasStoragePools := len(params.StoragePools) > 0

pkg/gce-pd-csi-driver/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUns
481481
// LVM PoC Steps
482482
klog.V(2).Infof("====== Start LVM PoC NodeUnstageVolume Steps ======")
483483
nodeId := ns.MetadataService.GetName()
484-
err = cleanupCache(volumeID, nodeId)
484+
err := cleanupCache(volumeID, nodeId)
485485
if err != nil {
486486
klog.Errorf("Failed to cleanup cache: %v", err)
487487
}

test/e2e/tests/single_zone_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
15351535

15361536
// Stage Disk
15371537
stageDir := filepath.Join("/tmp/", volName, "stage")
1538-
err = client.NodeStageExt4Volume(volID, stageDir)
1538+
err = client.NodeStageExt4Volume(volID, stageDir, false)
15391539
Expect(err).To(BeNil(), "failed to stage volume: %v", err)
15401540

15411541
// Create private bind mount

0 commit comments

Comments
 (0)