SUSE Support

Here When You Need Us

AutoYaST ask tags for network fail

This document (7017514) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 12 Service Pack 1 (SLES 12 SP1)
SUSE Linux Enterprise Server 11 Service Pack 4 (SLES 11 SP4)

Situation

An autoyast control file is configured to ask for various network settings. However, it fails to configure the IP address and errors out on the default route. If left unattended, the installation completes, but the networking is not configured properly.

The following error is observed.

Internal error. Please report a bug report with logs.
Details: private method 'select' called for nil:NilClass
Caller: /usr/share/YaST2/modules/Routing.rb:315:in 'write_route_file'

The administrator is prompted for the interface IP addresses based on the ask tag, but the addresses do not get configured and produce no errors.

The /var/log/YaST2/y2log shows the following:

[Ruby] clients/inst_autopost.rb:154 Calling auto client with: $["dns":$["dhcp_hostname":false, "dhcp_resolv":false, "domain":"utopia.com", "hostname":"linuxhost", "nameservers":["192.168.200.2"], "searchlist":["utopia.com"]], "interfaces":nil, "ipv6":true, "keep_install_network":false, "managed":false, "routing":$["ip_forward":false, "ipv4_forward":false, "ipv6_forward":false, "routes":nil], "start_immediately":true]

[Ruby] clients/lan_auto.rb:275 input=$["config":$["dhcp":$["DHCLIENT_SET_HOSTNAME":false]], "devices":$[], "dns":$["dhcp_hostname":false, "dhcp_resolv":false, "domain":"utopia.com", "hostname":"linuxhost", "nameservers":["192.168.200.2"], "searchlist":["utopia.com"]], "hwcfg":$[], "interfaces":[], "ipv6":true, "keep_install_network":false, "managed":false, "routing":$["ip_forward":false, "ipv4_forward":false, "ipv6_forward":false, "routes":nil], "start_immediately":true]

The following sections are found in the autoyast control file.

  <general>
    <ask-list config:type="list">
      <ask>
        <path>networking,dns,hostname</path>
        <question>Enter Hostname (server name)</question>
        <stage>initial</stage>
        <default>linux</default>
      </ask>
      <ask>
        <path>networking,interfaces,interface,0,ipaddr</path>
        <question>Enter the server IP address for eth0:</question>
        <stage>initial</stage>
        <default>192.168.2.10</default>
      </ask>
      <ask>
        <path>networking,interfaces,interface,1,ipaddr</path>
        <question>Enter the server IP address for eth1:</question>
        <stage>initial</stage>
        <default>192.168.2.11</default>
      </ask>
      <ask>
        <path>networking,routing,routes,route,0,gateway</path>
        <question>Enter the primary Gateway Address:</question>
        <stage>initial</stage>
        <default>192.168.2.2</default>
      </ask>
    </ask-list>
  </general>

  <networking>
    <dns>
      <dhcp_hostname config:type="boolean">false</dhcp_hostname>
      <dhcp_resolv config:type="boolean">false</dhcp_resolv>
      <domain>utopia.com</domain>
      <hostname>linux</hostname>
       <nameservers config:type="list">
         <nameserver>192.168.200.2</nameserver>
       </nameservers>
      <searchlist config:type="list">
        <search>utopia.com</search>
      </searchlist>
    </dns>
    <interfaces config:type="list">
      <interface>
        <bootproto>static</bootproto>
        <broadcast>192.168.1.255</broadcast>
        <device>eth0</device>
        <ethtool_options>autoneg on</ethtool_options>
        <ipaddr>10.0.0.1</ipaddr>
        <netmask>255.255.255.0</netmask>
        <network/>
        <startmode>onboot</startmode>
      </interface>
      <interface>
        <bootproto>static</bootproto>
        <broadcast>192.168.1.255</broadcast>
        <device>eth1</device>
        <ethtool_options>autoneg on</ethtool_options>
        <ipaddr>20.0.0.1</ipaddr>
        <netmask>255.255.255.0</netmask>
        <network/>
        <startmode>onboot</startmode>
      </interface>
    </interfaces>
    <routing>
      <ip_forward config:type="boolean">false</ip_forward>
      <ipv4_forward config:type="boolean">false</ipv4_forward>
      <ipv6_forward config:type="boolean">false</ipv6_forward>
      <routes config:type="list">
        <route>
          <destination>default</destination>
          <device>-</device>
          <gateway>0.0.0.0</gateway>
          <netmask>-</netmask>
        </route>
      </routes>
    </routing>
    <ipv6 config:type="boolean">true</ipv6>
    <keep_install_network config:type="boolean">false</keep_install_network>
    <managed config:type="boolean">false</managed>
  </networking>

Resolution

Change the following <ask><path> values from:

        <path>networking,interfaces,interface,0,ipaddr</path>
        <path>networking,interfaces,interface,1,ipaddr</path>
        <path>networking,routing,routes,route,0,gateway</path>

to:

        <path>networking,interfaces,0,ipaddr</path>
        <path>networking,interfaces,1,ipaddr</path>
        <path>networking,routing,routes,0,gateway</path>

Even though the error suggests reporting a bug for Routing.rb; the problem is a configuration issue, not a bug.

Cause

Invalid <ask><path> values.

Additional Information

The <ask><path> tag expects a list of the XML tags that represent the "path" to the value the ask tag is supposed to change. List entry tags are referenced by their ordered number only, not by their tag. For example.

<path>networking,interfaces,interface,0,ipaddr</path>

Implies an XML chain of <networking><interfaces><interface>0<ipaddr>. This is supposed to be the value changed. However, in this case the <interface> tag is not expected, only the numerical list number of the <interface> entries. So the correct XML chain is <networking><interfaces>0<ipaddr>, referring to the first <interface> list element in the AutoYaST control file.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7017514
  • Creation Date: 18-Apr-2016
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.