Skip to content

Commit

Permalink
allow for zero length partial config (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
steiler committed Jul 20, 2023
1 parent b92f658 commit 327fe3c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nodes/vr_sros/vr-sros.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ func (s *vrSROS) applyPartialConfig(ctx context.Context, addr, platformName, use
var err error
var d *network.Driver

configContent, err := utils.ReadFileContent(configFile)
if err != nil {
return err
}

// check file contains content, otherwise exit early
if len(strings.TrimSpace(string(configContent))) == 0 {
return nil
}

for loop := true; loop; {
if !s.isHealthy(ctx) {
time.Sleep(5 * time.Second) // cool-off period
Expand Down

0 comments on commit 327fe3c

Please sign in to comment.