Bug 1338631 - "SettingsNotFoundError" occur during install with ipv6 parameter in kickstart file.
Summary: "SettingsNotFoundError" occur during install with ipv6 parameter in kickstart...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: beta
: 7.3
Assignee: Radek Vykydal
QA Contact: Release Test Team
Depends On:
Blocks: ovirt-node-ng-platform
TreeView+ depends on / blocked
Reported: 2016-05-23 07:34 UTC by Wei Wang
Modified: 2016-11-16 10:50 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1339156 (view as bug list)
Last Closed: 2016-11-16 10:50:23 UTC
Target Upstream Version:

Attachments (Terms of Use)
tmp log files (21.27 KB, application/x-gzip)
2016-05-23 07:34 UTC, Wei Wang
no flags Details
/var/log/*.* (19.49 KB, application/x-gzip)
2016-05-23 07:35 UTC, Wei Wang
no flags Details
ks file (1014 bytes, text/plain)
2016-05-23 07:36 UTC, Wei Wang
no flags Details
ks file (924 bytes, text/plain)
2016-06-06 07:41 UTC, Wei Wang
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1339156 0 high CLOSED Improve documentation of --bootproto and --noipv4 network kickstart command options 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1339186 0 unspecified CLOSED Fix description of network --nameserver kickstart option. 2021-02-22 00:41:40 UTC

Internal Links: 1339156 1339186

Description Wei Wang 2016-05-23 07:34:18 UTC
Created attachment 1160471 [details]
tmp log files

Description of problem:
"SettingsNotFoundError" occur during install with ipv6 parameter in kickstart file.

Version-Release number of selected component (if applicable):
imgbased-0.6-0.1.el7ev.noarch vdsm-4.17.28-0.el7ev.noarch
Red Hat Enterprise Virtualization Manager Version:

How reproducible:

Steps to Reproduce:
1. Install ngn on machine with kickstart file in attachment
    network --device=enp0s25 --bootproto=static --ipv6=2001::1/64 --gateway=2001::2
2. Check the installation process

Actual results:
Installation failed, and "SettingsNotFoundError" occur.

Expected results:
Install successfully with ipv6 parameter

Additional info:

Comment 1 Wei Wang 2016-05-23 07:35:03 UTC
Created attachment 1160472 [details]

Comment 2 Wei Wang 2016-05-23 07:36:33 UTC
Created attachment 1160473 [details]
ks file

Comment 3 Fabian Deutsch 2016-05-23 07:40:51 UTC
I can not find the error in the logs, but it looks like an issue in anaconda.

Comment 4 Radek Vykydal 2016-05-23 13:25:12 UTC
The --bootoproto option is used only for ipv4 configuration. If used one needs to supply at least --ip and --netmask. In case you don't want to configure ipv4 on a device (not to use default which is dhcp), use --noipv4.
Also, for ipv6 gateway there is --ipv6gateway option (documented in rhel 7 installation guide, seems to be missing in https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#network).

What is the goal of your configuration?
Use ipv4 on the device during installation and configure ipv6 only for target system? Or configure static ipv6 additionally to ipv4 (dhcp)?

Comment 5 Radek Vykydal 2016-05-23 14:22:14 UTC
The connection on which anaconda crashes is not created because, as NM says:

07:20:45,048 WARNING NetworkManager: <warn>  ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-enp0s25" fails: ipv4.addresses: this property cannot be empty for 'method=manual'

when parsing this ifcfg file:

07:20:49,254 DEBUG ifcfg: /etc/sysconfig/network-scripts/ifcfg-enp0s25:
07:20:49,254 DEBUG ifcfg:   # Generated by parse-kickstart
07:20:49,254 DEBUG ifcfg:   UUID=7d0ab369-4245-4067-b066-736b8250be67
07:20:49,254 DEBUG ifcfg:   IPADDR=
07:20:49,254 DEBUG ifcfg:   GATEWAY=2001::2
07:20:49,254 DEBUG ifcfg:   IPV6_AUTOCONF=no
07:20:49,255 DEBUG ifcfg:   NETMASK=
07:20:49,255 DEBUG ifcfg:   BOOTPROTO=static
07:20:49,255 DEBUG ifcfg:   DEVICE=enp0s25
07:20:49,255 DEBUG ifcfg:   IPV6ADDR=2001::1/64
07:20:49,255 DEBUG ifcfg:   ONBOOT=yes
07:20:49,255 DEBUG ifcfg:   IPV6INIT=yes

Anaconda probably shouldn't be crashing though.
With RHEL 7.3 nightly http://download.eng.brq.redhat.com/pub/rhel/nightly/RHEL-7.3-20160520.n.0/ the traceback doesn't occur. It is because new NM actually creates the connection for the ifcfg file.

Comment 6 Wei Wang 2016-05-24 03:22:30 UTC
Hi Radek,

I want to use ipv4 on the device during installation and configure ipv6 only for target system. And the configure ipv6 statically. Should I using kickstart commands like below?
   network --device=enp0s25 --bootproto=dhcp
   network --device=enp0s25 --noipv4 --ipv6=2001::1/64 --ipv6gateway=2001::2

test with above commands in kickstart file, it can be installed successfully, and the configuration file looks like right for ipv6
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s25 
# Generated by parse-kickstart
NAME="System enp0s25"

if so, I think some update should be done in https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#network

Comment 7 Radek Vykydal 2016-05-24 08:57:46 UTC
You can configure a device only once in kickstart. The second configuration would override (or merge? the results are undefined) the first one. If you want to use different configurations of a device for installer environment and for target system, and you use networking in early stage (eg to fetch kickstart) configure the device for installation using boot options and for target system using kickstart.

In your case, the device configuration is not supplied via boot options, but because the device needs to be activated in early stage (initramfs) to fetch kickstart, dracut default is used which is: try dhcp on all devices. (If you wanted to configure the device for installer explicitly, you could use boot option ip=enp0s25:dhcp.)

For target system, you should be able to use just:

network --device=enp0s25 --noipv4 --ipv6=2001::1/64 --ipv6gateway=2001::2

(note that due to your first network command "network --device=enp0s25 --bootproto=dhcp", the device is configured to use dhcp for ipv4 on target system which is perhaps not what you want, using --noipv4)

The problem is that anaconda assumes --activate flag to be set for the first network command in kickstart, which means the device will be reactivated in later stage of installer (after switch root from initramfs when anaconda starts) with the kickstart configuration. We are thinking about removing this assumption (in scope of bug #1277975) to make the scenarios as yours possible.

As a workaround, make the network command be not the first one, ie use dummy first network command for nonexisting device [1]

network --device=DUMMY
network --device=enp0s25 --noipv4 --ipv6=2001::1/64 --ipv6gateway=2001::2

We should definitely update documentation (both https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#network and RHEL 7 installation guide saying that:
--bootproto is option for ipv4 configuration
--noipv4 needs to be used to disable ipv4 configuration
I'm going to open BZ for documentation team.

[1] or network --hostname can be moved to be the first command if it should be configured.

Comment 8 Radek Vykydal 2016-05-24 10:57:18 UTC
(In reply to Radek Vykydal from comment #7)

> We should definitely update documentation (both
> https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.
> rst#network and RHEL 7 installation guide saying that:
> --bootproto is option for ipv4 configuration
> --noipv4 needs to be used to disable ipv4 configuration
> I'm going to open BZ for documentation team.

bug 1339156

Comment 9 Radek Vykydal 2016-05-26 12:53:50 UTC
Upstream documentation update PR:

Comment 10 Radek Vykydal 2016-05-27 14:42:29 UTC
I've prepared updates image for RHEL 7.2 installer with patch adding --no-activate option. To check that it would fix your issue you just need to add --no-activate to your kickstart command


network --device=enp0s25 --noipv4 --ipv6=2001::1/64 --ipv6gateway=2001::2 --no-activate

and apply the updates image with boot option


Comment 11 Fabian Deutsch 2016-06-03 21:34:25 UTC
Wei, can you help Radek with comment 10?

Comment 12 Wei Wang 2016-06-06 07:40:20 UTC
Test Version

Test Steps:
1. Prepare kickstart file in attachment
   key parameter:
   network --device=enp0s25 --noipv4 --ipv6=2001::1/64 --gateway=2001::2 --no-activate

2. Install rhev-h with boot option and kickstart file in step 1

3. After reboot and login system, check device configuration file

Install successfully, and check result shows as below
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s25
# Generated by dracut initrd

Comment 13 Wei Wang 2016-06-06 07:41:42 UTC
Created attachment 1165089 [details]
ks file

Comment 14 Radek Vykydal 2016-11-16 10:50:23 UTC
--no-activate option has been added to RHEL 7.3 so the approach from comment #10 should work in 7.3. I am closing this bug, if the solution does not work for you with 7.3 feel free to reopen it.

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