Skip to content

Commit

Permalink
Fix bug #104
Browse files Browse the repository at this point in the history
  • Loading branch information
q131172019 committed Aug 9, 2022
1 parent f6eaec4 commit 8de91c3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions resource-management/test/resourceRegionMgrSimulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ func main() {
flag.Parse()
}

// Input parameter error handling for c.RpNum and c.NodesPerRP
// Fix bug #104
if c.RpNum < 1 || c.NodesPerRP < 1 {
klog.Info("")

if c.RpNum < 1 {
klog.Errorf("Error: Region resource manager simulator config / rp number per region: (%v) is less than 1", c.RpNum)
}

if c.NodesPerRP < 1 {
klog.Errorf("Error: Region resource manager simulator config / node number per rp: (%v) is less than 1", c.NodesPerRP)
}

klog.Info("")
os.Exit(1)
}

// Keep a more frequent flush frequency as 1 second
klog.StartFlushDaemon(time.Second * 1)

Expand Down

0 comments on commit 8de91c3

Please sign in to comment.