Bug 2028510 - Image creation fails when NMstateConfig CR is empty
Summary: Image creation fails when NMstateConfig CR is empty
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Telco Edge
Version: 4.9
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.11.0
Assignee: Ian Miller
QA Contact: yliu1
URL:
Whiteboard:
Depends On:
Blocks: 2057724
TreeView+ depends on / blocked
 
Reported: 2021-12-02 14:32 UTC by Mihir Lele
Modified: 2022-09-19 15:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-26 16:43:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Example of siteConfig not defining Node network -> NMstat (1.99 KB, text/plain)
2021-12-13 13:54 UTC, melserng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift-kni cnf-features-deploy pull 980 0 None open Bug 2028510: ztp: Suppress NMStateConfig when nodeNetwork empty 2022-02-23 15:12:34 UTC

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


Note You need to log in before you can comment on or make changes to this bug.