From 3242d2998e7213fa52b72ab0a4a411fd0fdba3af Mon Sep 17 00:00:00 2001 From: Carter Dodd Date: Sun, 5 Jun 2022 17:37:23 -0500 Subject: [PATCH] fixups --- internal/pkg/util/util.go | 6 +++--- internal/pkg/warewulfd/provision.go | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/pkg/util/util.go b/internal/pkg/util/util.go index 906aa779..811e39ed 100644 --- a/internal/pkg/util/util.go +++ b/internal/pkg/util/util.go @@ -31,7 +31,7 @@ var processLimitedNum int32 = 0 // Counter over total history of started processes var processLimitedCounter uint32 = 0 -func ProcessLimitedEnter() (index int32) { +func ProcessLimitedEnter() (index uint32) { atomic.AddInt32(&processLimitedNum, 1) index = atomic.AddUint32(&processLimitedCounter, 1) // NOTE: blocks when channel is full (i.e. processLimitedMax) @@ -45,8 +45,8 @@ func ProcessLimitedExit() { atomic.AddInt32(&processLimitedNum, -1) } -func ProcessLimitedStatus() (running int, queued int) { - running = len(processLimitedChan) +func ProcessLimitedStatus() (running int32, queued int32) { + running = int32(len(processLimitedChan)) queued = processLimitedNum - running return } diff --git a/internal/pkg/warewulfd/provision.go b/internal/pkg/warewulfd/provision.go index 678574d6..156ab3f1 100644 --- a/internal/pkg/warewulfd/provision.go +++ b/internal/pkg/warewulfd/provision.go @@ -10,7 +10,6 @@ import ( "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/container" "github.com/hpcng/warewulf/internal/pkg/kernel" - nodepkg "github.com/hpcng/warewulf/internal/pkg/node" "github.com/hpcng/warewulf/internal/pkg/util" "github.com/hpcng/warewulf/internal/pkg/warewulfconf" "github.com/hpcng/warewulf/internal/pkg/wwlog"