Skip to content

Commit 3ffb6af

Browse files
committed
Fix main.go bad merge from the latest commit hash of Data cache PRs
1 parent a420e9d commit 3ffb6af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/gce-pd-csi-driver/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ func fetchLssdsForRaiding(lssdCount int) ([]string, error) {
370370
return availableLssds[:lssdCount], nil
371371
}
372372

373-
func setupDataCache(ctx context.Context, nodeName string) error {
373+
func setupDataCache(ctx context.Context, nodeName string, nodeId string) error {
374374
isAlreadyRaided, err := driver.IsRaided()
375375
if err != nil {
376376
klog.V(4).Infof("Errored while scanning for available LocalSSDs err:%v; continuing Raiding", err)
@@ -400,6 +400,11 @@ func setupDataCache(ctx context.Context, nodeName string) error {
400400
return fmt.Errorf("Failed to Raid local SSDs, unable to setup Data Cache, got error %v", err)
401401
}
402402

403+
// Initializing data cache node (VG checks w/ raided lssd)
404+
if err := driver.InitializeDataCacheNode(nodeId); err != nil {
405+
return err
406+
}
407+
403408
klog.V(4).Infof("LSSD caching is setup for the Data Cache enabled node %s", nodeName)
404409
return nil
405410
}

0 commit comments

Comments
 (0)