A few usability fixes and put full node DB logic into warewulfd

This commit is contained in:
Gregory Kurtzer
2021-12-31 02:38:48 +00:00
parent 6b42362f37
commit 39ec7c0807
7 changed files with 79 additions and 27 deletions

View File

@@ -9,6 +9,7 @@ import (
"syscall"
"github.com/hpcng/warewulf/internal/pkg/warewulfconf"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
"github.com/pkg/errors"
)
@@ -22,9 +23,15 @@ func RunServer() error {
go func() {
for range c {
daemonLogf("Recieved SIGHUP, reloading...\n")
err := LoadNodeDB()
if err != nil {
fmt.Printf("ERROR: Could not load database: %s\n", err)
wwlog.Printf(wwlog.ERROR, "Could not load node DB: %s\n", err)
}
err = LoadNodeStatus()
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not prepopulate node status DB: %s\n", err)
}
}
}()