`openshift-install agent create image` fails with error: `nmstate only support saving DNS to interface with static gateway or auto interface with auto-dns:false`

Solution Verified - Updated -

Issue

When executing openshift-install agent create image under the following environment, an error nmstate only support saving DNS to interface with static gateway or auto interface with auto-dns:false is displayed, and the ISO file is not generated:

  • RHEL8/nmstatectl 1.x
  • agent-config.yaml written for deployment on a Disconnected Network without a default gateway.
ERROR <nmstatectl gc> failed, errorCode 1, stderr Traceback (most recent call last):  pkg=manifests
ERROR   File "/usr/bin/nmstatectl", line 11, in <module>  pkg=manifests
ERROR     load_entry_point('nmstate==1.4.4', 'console_scripts', 'nmstatectl')()  pkg=manifests
ERROR   File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 74, in main  pkg=manifests
ERROR     return args.func(args)                    pkg=manifests
ERROR   File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 397, in run_gen_config  pkg=manifests
ERROR     libnmstate.generate_configurations(state), use_yaml=use_yaml  pkg=manifests
ERROR   File "/usr/lib/python3.6/site-packages/libnmstate/nmstate.py", line 429, in generate_configurations  pkg=manifests
ERROR     net_state = NetState(desire_state, gen_conf_mode=True)  pkg=manifests
ERROR   File "/usr/lib/python3.6/site-packages/libnmstate/net_state.py", line 88, in __init__  pkg=manifests
ERROR     raise e                                   pkg=manifests
ERROR   File "/usr/lib/python3.6/site-packages/libnmstate/net_state.py", line 84, in __init__  pkg=manifests
ERROR     self._dns, self._route, ignored_dns_ifaces  pkg=manifests
ERROR   File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/ifaces.py", line 815, in gen_dns_metadata  pkg=manifests
ERROR     self, route_state, ignored_dns_ifaces     pkg=manifests
ERROR   File "/usr/lib/python3.6/site-packages/libnmstate/dns.py", line 122, in gen_metadata  pkg=manifests
ERROR     "auto-dns:false" % server                 pkg=manifests
ERROR libnmstate.error.NmstateValueError: Failed to find suitable interface for saving DNS name servers: 10.21.0.1, nmstate only support saving DNS to interface with static gateway or auto interface with auto-dns:false  pkg=manifests
ERROR , input yaml <dns-resolver:                   pkg=manifests
ERROR   config:                                     pkg=manifests
ERROR     server:                                   pkg=manifests
ERROR     - 10.21.0.1                               pkg=manifests
ERROR interfaces:                                   pkg=manifests
ERROR - ipv4:                                       pkg=manifests
ERROR     address:                                  pkg=manifests
ERROR     - ip: 10.21.0.80                          pkg=manifests
ERROR       prefix-length: 23                       pkg=manifests
ERROR     dhcp: false                               pkg=manifests
ERROR     enabled: true                             pkg=manifests
ERROR   mac-address: 52:54:00:65:61:21              pkg=manifests
ERROR   name: enp1s0                                pkg=manifests
ERROR   state: up                                   pkg=manifests
ERROR   type: ethernet                              pkg=manifests
ERROR >                                             pkg=manifests
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 fetch dependency of "Agent Installer Ignition": failed to fetch dependency of "Agent Manifests": failed to generate asset "NMState Config": staticNetwork configuration is not valid: 1 error occurred: 
FATAL     * failed to validate network yaml for host 0, failed to execute 'nmstatectl gc', error: Failed to find suitable interface for saving DNS name servers: 10.21.0.1, nmstate only support saving DNS to interface with static gateway or auto interface with auto-dns:false 
FATAL                                              
FATAL  

Environment

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content