Bug 854859 - Anaconda ignores --activate parameter in kickstart file when it's used in "%include file" section
Anaconda ignores --activate parameter in kickstart file when it's used in "%i...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
All All
medium Severity medium
: rc
: ---
Assigned To: Anaconda Maintenance Team
Release Test Team
Depends On:
  Show dependency treegraph
Reported: 2012-09-06 03:39 EDT by Petr Ruzicka
Modified: 2013-03-07 19:13 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-10 10:40:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Video showing the problem. (3.57 MB, video/x-msvideo)
2012-09-06 04:09 EDT, Petr Ruzicka
no flags Details
Sample kickstart file (531 bytes, application/octet-stream)
2012-09-06 04:30 EDT, Petr Ruzicka
no flags Details
Anaconda logs (49.55 KB, application/x-bzip2)
2012-09-06 05:31 EDT, Petr Ruzicka
no flags Details

  None (edit)
Description Petr Ruzicka 2012-09-06 03:39:09 EDT
*** Description of problem:
Anaconda didn't re-activate the network interface with specified network settings in the kickstart when using "network --activate".

*** Version-Release number of selected component (if applicable):
RHEL 6.3

*** How reproducible:
Start the RHEL 6.3 installation in the DHCP network. Put the attached kickstart file somewhere where the anaconda can grab it. 

*** Steps to Reproduce:
1. Let's have server connected to the "DHCP network". 
2. Create kickstart file with the following network settings:

network --activate --bootproto=static --ip= --netmask= --gateway= --nameserver=

(or use the attached ones)

3. Anaconda didn't reactivate the network interface with the specified options.
*** Actual results:
The anaconda didn't reactivate the network interfaces according the settings in kickstart files. For the whole installation it's using the DHCP setting instead of using the static network parameters.

*** Expected results:

Cite from installation manual:

If you use the --activate option on a device that has already been activated (for example, an interface you configured with boot options so that the system could retrieve the kickstart file) the device is reactivated to use the details specified in the kickstart file. 

*** Additional info:
Comment 2 Petr Ruzicka 2012-09-06 03:56:00 EDT
Created attachment 610206 [details]
Sample kickstart file
Comment 3 Petr Ruzicka 2012-09-06 04:08:52 EDT

Please note this it's working fine when using:

lang en_US
keyboard us
network --activate --bootproto=static --ip= --netmask= --gateway= --nameserver=

But it's not working in this case:

lang en_US
keyboard us
%include /tmp/Network

echo 'network --activate --bootproto=static --ip= --netmask= --gateway= --nameserver=' > /tmp/Network

So the problem appear only when using "%include".

Thank you

Comment 4 Petr Ruzicka 2012-09-06 04:09:53 EDT
Created attachment 610222 [details]
Video showing the problem.
Comment 5 Petr Ruzicka 2012-09-06 04:30:58 EDT
Created attachment 610225 [details]
Sample kickstart file
Comment 6 Petr Ruzicka 2012-09-06 05:30:35 EDT

I attached the anaconda log files (anaconda_logs.tar.bz2) where in directory "without-include" you can find the logs used with the kickstart:

lang en_US
keyboard us
network --activate --bootproto=static --ip= --netmask= --gateway= --nameserver=

^^^ this is working fine.

The logs in directory with-include contain the following kickstart:

lang en_US
keyboard us
%include /tmp/Network
echo 'network --activate --bootproto=static --ip= --netmask= --gateway= --nameserver=' > /tmp/Network

And this is not working properly.


Petr Ruzicka
Comment 7 Petr Ruzicka 2012-09-06 05:31:11 EDT
Created attachment 610241 [details]
Anaconda logs
Comment 8 Petr Ruzicka 2012-09-06 09:32:37 EDT

The workaround can looks like:

lang en_US
keyboard us
%include /tmp/Network
clearpart --all
bootloader --location mbr
timezone America/Denver
auth --enablemd5 --enableshadow
rootpw redhat
selinux --disabled
firewall --disabled
key --skip
clearpart --all
part /boot --fstype="ext3" --size=200
part / --fstype="ext3" --size=5000
part swap --fstype="swap" --size=500


echo 'network --activate --bootproto=static --ip= --netmask= --gateway= --nameserver=192.168.122

sed -i 's/^BOOTPROTO=.*/BOOTPROTO=static/' /etc/sysconfig/network-scripts/ifcfg-eth0
cat >> /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
mv /etc/sysconfig/network-scripts/ifcfg-eth0 /tmp/
mv /tmp/ifcfg-eth0 /etc/sysconfig/network-scripts/


Petr Ruzicka
Comment 9 Chris Lumens 2012-09-10 10:40:46 EDT
network commands cannot be in an include.  The network command is processed very early on (in loader) and loader does not understand includes.  This is really too much work for us to do anything about, either.  Sorry.

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