Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pkg/syncer/cnsoperator/controller/cnsfileaccessconfig/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ func getMaxWorkerThreadsToReconcileCnsFileAccessConfig(ctx context.Context) int
log.Warnf("Maximum number of worker threads to run set in env variable "+
"WORKER_THREADS_FILE_ACCESS_CONFIG %s is less than 1, will use the default value %d",
v, defaultMaxWorkerThreadsForFileAccessConfig)
} else if value > defaultMaxWorkerThreadsForFileAccessConfig {
log.Warnf("Maximum number of worker threads to run set in env variable "+
"WORKER_THREADS_FILE_ACCESS_CONFIG %s is greater than %d, will use the default value %d",
v, defaultMaxWorkerThreadsForFileAccessConfig, defaultMaxWorkerThreadsForFileAccessConfig)
} else {
workerThreads = value
log.Debugf("Maximum number of worker threads to run to reconcile "+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,6 @@ func getMaxWorkerThreadsToReconcileCnsNodeVmAttachment(ctx context.Context) int
log.Warnf("Maximum number of worker threads to run set in env variable "+
"WORKER_THREADS_NODEVM_ATTACH %s is less than 1, will use the default value %d",
v, defaultMaxWorkerThreadsForNodeVMAttach)
} else if value > defaultMaxWorkerThreadsForNodeVMAttach {
log.Warnf("Maximum number of worker threads to run set in env variable "+
"WORKER_THREADS_NODEVM_ATTACH %s is greater than %d, will use the default value %d",
v, defaultMaxWorkerThreadsForNodeVMAttach, defaultMaxWorkerThreadsForNodeVMAttach)
} else {
workerThreads = value
log.Debugf("Maximum number of worker threads to run to reconcile CnsNodeVmAttachment "+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func getMaxWorkerThreads(ctx context.Context) int {
}

switch {
case value <= 0 || value > defaultMaxWorkerThreads:
case value <= 0:
log.Warnf("Value %s for WORKER_THREADS_NODEVM_BATCH_ATTACH is invalid. Using default value %d",
envVal, defaultMaxWorkerThreads)
default:
Expand Down
4 changes: 0 additions & 4 deletions pkg/syncer/cnsoperator/controller/cnsregistervolume/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,6 @@ func getMaxWorkerThreadsToReconcileCnsRegisterVolume(ctx context.Context) int {
log.Warnf("Maximum number of worker threads to run set in env variable "+
"WORKER_THREADS_REGISTER_VOLUME %s is less than 1, will use the default value %d",
v, defaultMaxWorkerThreadsForRegisterVolume)
} else if value > defaultMaxWorkerThreadsForRegisterVolume {
log.Warnf("Maximum number of worker threads to run set in env variable "+
"WORKER_THREADS_REGISTER_VOLUME %s is greater than %d, will use the default value %d",
v, defaultMaxWorkerThreadsForRegisterVolume, defaultMaxWorkerThreadsForRegisterVolume)
} else {
workerThreads = value
log.Debugf("Maximum number of worker threads to run to reconcile CnsRegisterVolume instances is set to %d",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func getMaxWorkerThreads(ctx context.Context) int {
}

switch {
case val <= 0 || val > defaultMaxWorkerThreads:
case val <= 0:
log.Warnf("Value %d for WORKER_THREADS_UNREGISTER_VOLUME is invalid. Using default value %d",
val, defaultMaxWorkerThreads)
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,6 @@ func getMaxWorkerThreadsToReconcileCnsVolumeMetadata(ctx context.Context) int {
if value <= 0 {
log.Warnf("Maximum number of worker threads to run set in env variable WORKER_THREADS_VOLUME_METADATA %s is "+
"less than 1, will use the default value %d", v, defaultMaxWorkerThreadsToProcessCnsVolumeMetadata)
} else if value > defaultMaxWorkerThreadsToProcessCnsVolumeMetadata {
log.Warnf("Maximum number of worker threads to run set in env variable WORKER_THREADS_VOLUME_METADATA %s "+
"is greater than %d, will use the default value %d",
v, defaultMaxWorkerThreadsToProcessCnsVolumeMetadata, defaultMaxWorkerThreadsToProcessCnsVolumeMetadata)
} else {
workerThreads = value
log.Debugf("Maximum number of worker threads to run is set to %d", workerThreads)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func getMaxWorkerThreadsToReconcileVirtualMachineSnapshot(ctx context.Context) i
return workerThreads
}
switch {
case value <= 0 || value > defaultMaxWorkerThreadsForVirtualMachineSnapshot:
case value <= 0:
log.Warnf("Value %s for WORKER_THREADS_VIRTUAL_MACHINE_SNAPSHOT is invalid. Using default value %d",
envVal, defaultMaxWorkerThreadsForVirtualMachineSnapshot)
default:
Expand Down