RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 854859 - Anaconda ignores --activate parameter in kickstart file when it's used in "%include file" section
Summary: Anaconda ignores --activate parameter in kickstart file when it's used in "%i...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda
Version: 6.3
Hardware: All
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-06 07:39 UTC by Petr Ruzicka
Modified: 2018-11-29 20:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-10 14:40:46 UTC
Target Upstream Version:
Embargoed:


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

Description Petr Ruzicka 2012-09-06 07:39:09 UTC
*** 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=10.120.33.185 --netmask=255.255.255.0 --gateway=10.120.33.1 --nameserver=145.245.100.100

(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:
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Installation_Guide/index.html#s1-kickstart2-options

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 07:56:00 UTC
Created attachment 610206 [details]
Sample kickstart file

Comment 3 Petr Ruzicka 2012-09-06 08:08:52 UTC
Hello

Please note this it's working fine when using:

...
lang en_US
keyboard us
network --activate --bootproto=static --ip=10.1.3.2 --netmask=255.255.255.0 --gateway=10.1.3.1 --nameserver=10.1.3.1
zerombr
...

But it's not working in this case:

...
lang en_US
keyboard us
%include /tmp/Network
zerombr
...

%pre
echo 'network --activate --bootproto=static --ip=10.1.3.2 --netmask=255.255.255.0 --gateway=10.1.3.1 --nameserver=10.1.3.1' > /tmp/Network

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

Thank you

PetrR

Comment 4 Petr Ruzicka 2012-09-06 08:09:53 UTC
Created attachment 610222 [details]
Video showing the problem.

Comment 5 Petr Ruzicka 2012-09-06 08:30:58 UTC
Created attachment 610225 [details]
Sample kickstart file

Comment 6 Petr Ruzicka 2012-09-06 09:30:35 UTC
Hello.

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=192.168.122.250 --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122.1
zerombr
...


^^^ this is working fine.


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

...
lang en_US
keyboard us
%include /tmp/Network
zerombr
.
.
.
%pre
echo 'network --activate --bootproto=static --ip=192.168.122.250 --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122.1' > /tmp/Network

And this is not working properly.

Regards

Petr Ruzicka

Comment 7 Petr Ruzicka 2012-09-06 09:31:11 UTC
Created attachment 610241 [details]
Anaconda logs

Comment 8 Petr Ruzicka 2012-09-06 13:32:37 UTC
Hello.

The workaround can looks like:


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

%packages
@Base

%pre
echo 'network --activate --bootproto=static --ip=192.168.122.250 --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122

sed -i 's/^BOOTPROTO=.*/BOOTPROTO=static/' /etc/sysconfig/network-scripts/ifcfg-eth0
cat >> /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
DNS1="192.168.122.1"
GATEWAY="192.168.122.1"
IPADDR="192.168.122.250"
NETMASK="255.255.255.0"
NM_CONTROLLED="yes"
EOF
mv /etc/sysconfig/network-scripts/ifcfg-eth0 /tmp/
mv /tmp/ifcfg-eth0 /etc/sysconfig/network-scripts/


Regards

Petr Ruzicka

Comment 9 Chris Lumens 2012-09-10 14:40:46 UTC
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.