Bug 2117302

Summary: [Agent]: Update error message when neither rendezvousIP is provided in agent config, no nmstateConfig.yaml and also no hosts information is provided in agentConfig.yaml
Product: OpenShift Container Platform Reporter: Pawan Pinjarkar <ppinjark>
Component: InstallerAssignee: Pawan Pinjarkar <ppinjark>
Installer sub component: Agent based installation QA Contact: Nora Niu <zniu>
Status: CLOSED NOTABUG Docs Contact:
Severity: medium    
Priority: medium CC: asakthiv, zbitter
Version: 4.11   
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-13 17:39:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pawan Pinjarkar 2022-08-10 14:56:50 UTC
When neither rendezvousIP is provided in agent config, no nmstateConfig.yaml and also 
no hosts information is provided in agentConfig.yaml
Image creation fails with error: 

failed to fetch Agent Installer ISO: failed to fetch dependency of "Agent Installer ISO": failed to generate asset "Agent Installer Ignition": invalid NMStateConfig yaml, no valid interfaces set


The error message is confusing to the end users.

Manifests to reproduce the error:
https://drive.google.com/drive/folders/1lJSu-JIkbSgqH36JHSgerUQtJXKoFsob

Comment 1 Pawan Pinjarkar 2022-09-23 15:54:48 UTC
Pawan to take a look at reproducing it again and close if not reproducible.

Comment 2 Pawan Pinjarkar 2022-10-11 16:10:23 UTC
When no nmstateconfig is provided and the agentConfig neither has rendezvous IP nor the hosts data, then currently, the image generation fails with a clear and better message as below:

ERROR failed to write asset (Agent Installer ISO) to disk: cannot generate ISO image due to configuration errors 
FATAL failed to fetch Agent Installer ISO: failed to fetch dependency of "Agent Installer ISO": failed to generate asset "Agent Installer Ignition": missing rendezvousIP in agent-config or at least one NMStateConfig manifest

Comment 3 Pawan Pinjarkar 2022-10-11 16:11:03 UTC
I tried this on the latest master branch code, FYI.