-
Bug
-
Resolution: Done
-
Major
-
None
-
rhel-8.6.0
-
None
-
Important
-
rhel-anaconda
-
ssg_front_door
-
0
-
False
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
x86_64
-
None
-
57,005
Description of problem:
A customer boots a custom DVD of RHEL8.4 or 8.6 rebuilt to include a kickstart.
The kickstart configures a VLAN in a %pre script, then makes use of %include directive, as shown below:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
%pre
echo "network --hostname=vlantest" > /tmp/network-include
echo "network --ip=10.31.102.169 --nameserver=10.218.128.140,10.201.119.225 --netmask=255.255.255.224 --gateway=10.31.102.161 --device=enp1s0 --vlanid=3700 --bootproto=static --activate" >> /tmp/network-include
%end
%include /tmp/network-include
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
When using such directive, the network is configured but not automatically enabled.
The customer then needs to use "nmcli con enp1s0.vlan3700 up" to bring up the network.
Investigation showed that specifying directly the network configuration in the kickstart works, e.g.:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
network --hostname=vlantest
network --ip=10.31.102.169 --nameserver=10.218.128.140,10.201.119.225 --netmask=255.255.255.224 --gateway=10.31.102.161 --device=enp1s0 --vlanid=3700 --bootproto=static --activate
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Also, not using a VLAN while configuring in %pre script works, e.g.:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
%pre
echo "network --hostname=vlantest" > /tmp/network-include
echo "network --ip=10.31.102.169 --nameserver=10.218.128.140,10.201.119.225 --netmask=255.255.255.224 --gateway=10.31.102.161 --device=enp1s0 --bootproto=static --activate" >> /tmp/network-include
%end
%include /tmp/network-include
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
It's only problematic when %include points to a file containing network directives related to a vlan (initial configuration block).
Version-Release number of selected component (if applicable):
RHEL8.4 and later DVD, didn't try with older DVDs.
How reproducible:
Always
Steps to Reproduce:
1. Download the BOOT DVD and extract it
- mkdir rhel-8.6-x86_64-boot.iso.orig rhel-8.6-x86_64-boot.iso.fixed
- mount /tmp/rhel-8.6-x86_64-boot.iso rhel-8.6-x86_64-boot.iso.orig
- cp -avRf rhel-8.6-x86_64-boot.iso.orig/* rhel-8.6-x86_64-boot.iso.fixed/
- cd rhel-8.6-x86_64-boot.iso.fixed/
2. Create a basic kickstart configuring a vlan through a %pre script
- vim ks.cfg
-
-
-
-
-
-
- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
%pre
echo "network --hostname=vlantest" > /tmp/network-include
echo "network --ip=10.31.102.169 --nameserver=10.218.128.140,10.201.119.225 --netmask=255.255.255.224 --gateway=10.31.102.161 --device=enp1s0 --vlanid=3700 --bootproto=static --activate" >> /tmp/network-include
%end
- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
-
-
-
-
-
-
%include /tmp/network-include
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
3. Add the kickstart to the kernel command line
- sed -i 's/linuxefi (.*)/linuxefi \1 inst.ks=cdrom:\/ks.cfg/g' EFI/BOOT/grub.cfg
- sed -i 's/append (.*)/append \1 inst.ks=cdrom:\/ks.cfg/g' isolinux/isolinux.cfg
4. Rebuild the DVD
- mkisofs -o /tmp/rhel-8.6-x86_64-boot.iso.fixed -b isolinux/isolinux.bin -J -R -l -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -graft-points -V "RHEL-8-6-0-BaseOS-x86_64" .
5. Boot the DVD
Actual results:
No network configured, but configuration present in "nmcli con show"
Expected results:
Network activated
- external trackers