You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/gce-pd-csi-driver/main.go
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,7 @@ var (
71
71
formatAndMountTimeout=flag.Duration("format-and-mount-timeout", 1*time.Minute, "The maximum duration of a format and mount operation before another such operation will be started. Used only if --serialize-format-and-mount")
72
72
fallbackRequisiteZonesFlag=flag.String("fallback-requisite-zones", "", "Comma separated list of requisite zones that will be used if there are not sufficient zones present in requisite topologies when provisioning a disk")
73
73
enableStoragePoolsFlag=flag.Bool("enable-storage-pools", false, "If set to true, the CSI Driver will allow volumes to be provisioned in Storage Pools")
74
-
// TODO: set enableDataCacheFlag default to false after testing
75
-
enableDataCacheFlag=flag.Bool("enable-data-cache", true, "If set to true, the CSI Driver will allow volumes to be provisioned with data cache configuration")
74
+
enableDataCacheFlag=flag.Bool("enable-data-cache", false, "If set to true, the CSI Driver will allow volumes to be provisioned with data cache configuration")
76
75
77
76
multiZoneVolumeHandleDiskTypesFlag=flag.String("multi-zone-volume-handle-disk-types", "", "Comma separated list of allowed disk types that can use the multi-zone volumeHandle. Used only if --multi-zone-volume-handle-enable")
78
77
multiZoneVolumeHandleEnableFlag=flag.Bool("multi-zone-volume-handle-enable", false, "If set to true, the multi-zone volumeHandle feature will be enabled")
@@ -235,8 +234,11 @@ func handle() {
235
234
}
236
235
237
236
if*enableDataCacheFlag {
238
-
klog.V(2).Info("Raiding local ssd")
239
-
driver.RaidLocalSsds()
237
+
klog.V(2).Info("Raiding local ssds to setup data cache")
238
+
err:=driver.RaidLocalSsds()
239
+
iferr!=nil {
240
+
klog.Fatalf("Failed to Raid local SSDs, unable to setup data caching, got error %v", err)
klog.V(2).Infof("============================== volumeGroupName is %v ==============================", volumeGroupName)
31
31
32
-
klog.V(2).Infof("====== vgscan before vgcreate ======")
32
+
klog.V(2).Infof("============================== vgscan before vgcreate ==============================")
33
33
args:= []string{}
34
34
info, err:=common.RunCommand("vgscan", args...)
35
35
iferr!=nil {
36
36
klog.Errorf("vgscan error %v: %s", err, info)
37
37
}
38
-
klog.V(2).Infof("====== vgscan info contains volumeGroupName or not %v ======", strings.Contains(string(info), volumeGroupName))
38
+
klog.V(2).Infof("============================== vgscan info contains volumeGroupName or not %v ==============================", strings.Contains(string(info), volumeGroupName))
39
39
// Check if the required volume group already exists
chunkSize:="960"// Cannot use default chunk size(64KiB) as it errors on maxChunksAllowed. Unit - KiB
160
-
klog.V(2).Infof("====== fastCacheSize is %v ======", fastCacheSize)
161
-
klog.V(2).Infof("====== lvcreate fast cache layer again with the VolumeGroup %v======", volumeGroupName)
155
+
klog.V(2).Infof("============================== fastCacheSize is %v ==============================", fastCacheSize)
156
+
klog.V(2).Infof("============================== lvcreate fast cache layer again with the VolumeGroup %v==============================", volumeGroupName)
@@ -287,17 +282,17 @@ func reduceVolumeGroup(volumeGroupName string, force bool) {
287
282
funcRaidLocalSsds() error {
288
283
isAlreadyRaided, err:=isRaided()
289
284
iferr!=nil {
290
-
klog.V(2).Infof("======Errored while scanning for available LocalSSDs err:%v; continuing Raiding=======", err)
285
+
klog.V(2).Infof("============================== Errored while scanning for available LocalSSDs err:%v; continuing Raiding ==============================", err)
291
286
} elseifisAlreadyRaided {
292
-
klog.V(2).Infof("===============Local SSDs are already RAIDed==============")
287
+
klog.V(2).Infof("============================== Local SSDs are already RAIDed ==============================")
0 commit comments