Bug 979966

Summary: kickstart snippet post_install_network_config creates deprecated modprobe.conf on RHEL6
Product: Red Hat Satellite 5 Reporter: Ron van der Wees <rvdwees>
Component: ProvisioningAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Pramuk <lpramuk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 550CC: cperry, dyordano, jhutar, lpramuk, mmraka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: cobbler-2.0.7-47 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-25 22:19:21 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:
Bug Depends On:    
Bug Blocks: 1127215    
Attachments:
Description Flags
cobbler-modprobe-d.patch none

Description Ron van der Wees 2013-07-01 08:43:01 UTC
Description of problem:
The kickstart snippet post_install_network_config creates deprecated modprobe.conf on RHEL6

Version-Release number of selected component (if applicable):
cobbler-2.0.7-21.el6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create kickstart profile
2. Add a post install script
3. Add $SNIPPET('post_install_network_config')
4. kickstart a machine using this profile

Actual results:
Restarting iptables after the systems is kicstarted:
[root@hostname ~]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules: WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
                                                           [  OK  ]


Expected results:
Distinct between RHEL versions and create the proper config file:
RHEL5: /etc/modprobe.conf
RHEL6: /etc/modprobe.d/<name>.conf
to avoid warnings about the deprecated use of modprobe.conf in RHEL6.

Additional info:
Although modprobe.conf is still supported, it is depecated. Upsteam cobbler does not make a difference between RHEL versions as well:
<https://github.com/cobbler/cobbler/blob/master/snippets/post_install_network_config>

Comment 2 Michael Mráka 2013-11-12 12:06:20 UTC
Created attachment 822886 [details]
cobbler-modprobe-d.patch

Don't create deprecated modprobe.conf on RHEL6+

Comment 3 Michael Mráka 2014-09-10 13:27:52 UTC
Patch committed to SAETLLITE-5.7 as
commit aa14047f59d01caa2fea520df4cc7ecb0d184c1e
    979966 - support modprobe.d on RHEL6

Comment 6 Lukas Pramuk 2014-10-22 12:26:26 UTC
VERIFIED. cobbler-2.0.7-48.el6sat.noarch

To hit the creation of modprobe files we need to use provisioning with set-up bonding. Bonding canbe be set up only for novirt ks profiles.
We need to provision either physical machine or flex guest using novirt ks profile.

1) @webui: navifgate to Provisioning - Kickstart - Schedule - Advanced Kickstart Configuration
(o) Create a bonded network interface after installation, use DHCP
Configure bond Name: bond0, Interfaces: select "eth0" , Options: mode=1

2) @client:
# rhn_check -vv
# shutdown -c
# reboot

3) @client: after a machine was provisioned check created files


FIX:
# cat /etc/modprobe.d/post_install_network_config.conf 
options bonding max_bonds=1
alias bond0 bonding


vs.

REPRO:
# cat /etc/modprobe.conf
...
options bonding max_bonds=1
alias bond0 bonding