Updates around VNFS restructure and kernel restructure. More coming.

This commit is contained in:
Gregory Kurtzer
2020-12-05 16:43:30 -08:00
parent 4efb27a82f
commit 0095b55624
28 changed files with 791 additions and 425 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/hpcng/warewulf/internal/pkg/node"
"github.com/hpcng/warewulf/internal/pkg/util"
"github.com/hpcng/warewulf/internal/pkg/vnfs"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
@@ -43,6 +44,23 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
os.Exit(1)
}
if SetVnfs != "" {
if vnfs.ValidSource(SetVnfs) == true {
imageFile := vnfs.ImageFile(SetVnfs)
if util.IsFile(imageFile) == false {
wwlog.Printf(wwlog.ERROR, "VNFS has not been built: %s\n", SetVnfs)
if SetForce == false {
os.Exit(1)
}
}
} else {
wwlog.Printf(wwlog.ERROR, "VNFS does not exist: %s\n", SetVnfs)
if SetForce == false {
os.Exit(1)
}
}
}
for _, n := range nodes {
wwlog.Printf(wwlog.VERBOSE, "Evaluating node: %s\n", n.Id.Get())