Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2028510

Summary: Image creation fails when NMstateConfig CR is empty
Product: OpenShift Container Platform Reporter: Mihir Lele <mlele>
Component: Telco EdgeAssignee: Ian Miller <imiller>
Telco Edge sub component: ZTP QA Contact: yliu1
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs, ealcaniz, eparis, melserng, mfilanov, ykashtan
Version: 4.9   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-26 16:43:57 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:
Bug Depends On:    
Bug Blocks: 2057724    
Attachments:
Description Flags
Example of siteConfig not defining Node network -> NMstat none

Description Mihir Lele 2021-12-02 14:32:22 UTC
Description of problem:

1.   CRs are created to install SNO cluster via siteconfig
2.  Empty NMStateConfig CR is generated. This is causing issues for Image generation.  On deletion of NMStateConfig CR, Image creation and installation happens fine

Expected result:

NMstateConfig CR should not be generated empty or should not effect Image creation

Additional info:

Error - 
Failed to create image: 1 error occurred:\n\t* <nmstatectl gc> failed, errorCode 1, stderr Traceback (most recent call last):\n  File \"/usr/bin/nmstatectl\", line 11, in <module>\n    load_entry_point('nmstate==1.0.2', 'console_scripts', 'nmstatectl')()\n  File \"/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py\", line 73, in main\n    return args.func(args)\n  File \"/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py\", line 378, in run_gen_config\n    if statedata[0] == \"{\":\nIndexError: string index out of range\n, input yaml <>\n\n"
    reason: ImageCreationError


It seems like we don't validate an empty NMState.

Comment 7 melserng 2021-12-13 13:54:35 UTC
Created attachment 1846091 [details]
Example of siteConfig not defining Node network -> NMstat