From 91a9e3ca7a89aefdda873cfa5b59d6600a0718d8 Mon Sep 17 00:00:00 2001 From: SUDEESH JOHN Date: Thu, 2 Jul 2026 18:32:40 +0530 Subject: [PATCH] fix: allow netboot boot method for SNO clusters Remove the hard interlock that blocked SNO + netboot in both AgentConfig.Validate() and the create-template command. Netboot is a valid boot method for Single Node OpenShift deployments. Signed-off-by: SUDEESH JOHN --- cmd/createtemplate.go | 6 +----- types/types.go | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cmd/createtemplate.go b/cmd/createtemplate.go index 769adf9..376bb35 100644 --- a/cmd/createtemplate.go +++ b/cmd/createtemplate.go @@ -74,11 +74,6 @@ func runGenerateConfig(cmd *cobra.Command, args []string) error { return fmt.Errorf("invalid boot method: '%s'. Must be 'agent' or 'netboot'", bootMethod) } - // Interlock: SNO + netboot is an invalid combination - if configType == "sno" && bootMethod == "netboot" { - return fmt.Errorf("invalid combination: Single Node OpenShift (SNO) requires the 'agent' boot method. Netboot is not supported for SNO") - } - if _, err := os.Stat(genOutputPath); err == nil { return fmt.Errorf("file '%s' already exists. Refusing to overwrite", genOutputPath) } @@ -125,6 +120,7 @@ func runGenerateConfig(cmd *cobra.Command, args []string) error { return nil } + // TemplateData struct type TemplateData struct { IsSNO bool diff --git a/types/types.go b/types/types.go index fc72294..2e8a338 100644 --- a/types/types.go +++ b/types/types.go @@ -332,9 +332,6 @@ func (c *AgentConfig) GetAllNodes() []*NodeConfig { // Validate processes configuration layout rules before triggering pipelines. func (c *AgentConfig) Validate() error { if c.IsSNO() { - if c.Nodes.BootMethod == "netboot" { - return fmt.Errorf("topology mismatch: Single Node OpenShift (SNO) is completely incompatible with 'netboot'") - } if len(c.Nodes.Workers) > 0 || len(c.Nodes.Bootstrap) > 0 { return fmt.Errorf("topology conflict: exactly 1 master node is defined, triggering Single Node OpenShift (SNO) mode. However, you still have targets listed under 'workers' or 'bootstrap'. Please remove those extra nodes to proceed") }