Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] #104 - simulator: panic: invalid argument to Intn #126

Merged
merged 2 commits into from
Aug 10, 2022
Merged
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
14 changes: 14 additions & 0 deletions resource-management/test/resourceRegionMgrSimulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ func main() {
flag.Parse()
}

// Input parameter error handling for c.RpNum and c.NodesPerRP
// Fix bug #104
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)
os.Exit(1)
}

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

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

Expand Down