Bug 1374090

Summary: Static network configuration defined in kickstart loaded from hard disk not applied to installed system
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: anaconda-maint-list, dcbw, fgiudici, g.kaviyarasu, jonathan, lkundrak, mkolman, psimerda, rvykydal, thaller, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-29 16:51:18 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:

Description Adam Williamson 2016-09-07 23:37:10 UTC
Since Fedora-25-20160904.n.0 , one of our openQA tests has failed on every compose. That test uses a kickstart that looks like this:

install
cdrom
bootloader --location=mbr
network --device=link --activate --bootproto=static --ip=10.0.2.101 --netmask=255.255.255.0 --gateway=10.0.2.2 --hostname=client001.domain.local --nameserver=10.0.2.100
lang en_US.UTF-8
keyboard us
timezone --utc America/New_York
clearpart --all
autopart
%packages
@^server-product-environment
%end
rootpw anaconda
reboot
realm join --one-time-password=monkeys ipa001.domain.local

The kickstart is loaded from a hard disk (it is not retrieved over the network). The network it's on has no DHCP server. When the installed system boots, it has no network connectivity. With Fedora-25-20160903.n.0 and earlier, this worked fine.

I reproduced the issue locally with a similar kickstart, slightly tweaked for my local network settings and with a smaller package set to save install time - https://www.happyassassin.net/temp/static.ks .

If I load that kickstart over the network - i.e. inst.ks=https://www.happyassassin.net/temp/static.ks - I don't hit the bug. The installed system does use the specified static network configuration (so with my modified kickstart, it comes up with IP 192.168.1.105 , which is not in my DHCP server's range so I know it's not just getting it by luck).

However, if I load the kickstart from a hard disk attached to the VM, I *can* reproduce the bug. The installed system does not use the static configuration specified in the kickstart. In my case the connection comes up via DHCP, because I have a DHCP server on my network, but the bug is really the same - the configuration in the kickstart is not applied.

In the installed system, there is no /etc/sysconfig/network-scripts/ifcfg-(interface) file at all - there is only ifcfg-lo . The string '192.168.1.105' does not appear in any file in the whole of /etc. /var/log/anaconda/ifcfg.log does not show the static config values in its 'all settings' list.

When I load the kickstart over the network instead of from a hard disk, there *is* a /etc/sysconfig/network-scripts/ifcfg-ens3 in the installed system, with the appropriate config values, and the comment "# Generated by parse-kickstart" . /var/log/anaconda/ifcfg.log *does* show the static config values in its 'all settings' list.

I'm assigning this to NetworkManager because anaconda did not change between Fedora-25-20160903.n.0 and Fedora-25-20160904.n.0 , but NetworkManager did - it went from 1.4.0-0.5.git20160621.072358da.fc25 to 1.4.0-2.fc25 . There may well be some kind of NM<->anaconda interaction involved, though.

Comment 1 Radek Vykydal 2016-09-08 08:07:47 UTC
I am pretty sure this issue has the same cause as bug #1371338, which also appeared in 0904: https://bugzilla.redhat.com/show_bug.cgi?id=1371338#c16. What the bugs have in common is that ifcfg files are not created in initramfs and their creating in anaconda after switch root fails.

Should be fixed in anaconda-25.21-1.

Comment 2 Adam Williamson 2016-09-29 16:51:18 UTC
Yeah, the openQA test is passing now, so this must be fine.