Skip to content

Commit

Permalink
fix: unnecessary check and restore log trace
Browse files Browse the repository at this point in the history
  • Loading branch information
cescribanohs committed Oct 28, 2024
1 parent f7f77ee commit ce6fa56
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/driver/efs_watch_dog.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,11 @@ func (w *execWatchdog) updateConfig(efsClientSource string) error {
region := os.Getenv("AWS_DEFAULT_REGION")
fipsEnabled := os.Getenv("FIPS_ENABLED")
portRangeUpperBound := os.Getenv("PORT_RANGE_UPPER_BOUND")
if portRangeUpperBound == "" {
val, err := strconv.Atoi(portRangeUpperBound)
if err != nil || val < 21049 {
portRangeUpperBound = "21049"
} else {
val, err := strconv.Atoi(portRangeUpperBound)
if err != nil || val < 21049 {
portRangeUpperBound = "21049"
}
}

efsCfg := efsUtilsConfig{EfsClientSource: efsClientSource, Region: region, FipsEnabled: fipsEnabled, PortRangeUpperBound: portRangeUpperBound}
if err = efsCfgTemplate.Execute(f, efsCfg); err != nil {
return fmt.Errorf("cannot update config %s for efs-utils. Error: %v", w.efsUtilsCfgPath, err)
Expand Down Expand Up @@ -322,6 +319,7 @@ func (w *execWatchdog) runLoop(stopCh <-chan struct{}) {
for {
select {
case <-stopCh:
klog.Info("stopping...")
break
default:
err := w.exec()
Expand Down

0 comments on commit ce6fa56

Please sign in to comment.