On Mon, Dec 8, 2008 at 2:05 PM, Michael DeHaan <mdehaan(a)redhat.com> wrote:
I recently made a change so that if a system in Cobbler has multiple
interfaces but no details about those interfaces, the kickstart is still
valid -- that is to say, it's trivially easy to make a virtual machine
again that has no MAC, IP, or hostname assignments if someone wants.
However, when I create such a system, I get a network config post
section that I don't /quite/ understand. As I understand it this code
is intended to reorder the NICs such that they are in the right order
(assumed ok) and optionally set up bonding and vlan information (assumed ok)
Here's what I get:
mkdir /etc/sysconfig/network-scripts/cobbler
cp /etc/sysconfig/network-scripts/ifcfg-lo
/etc/sysconfig/network-scripts/cobbler/
# Start eth1
sed -i "s/eth0/eth1/" /etc/modprobe.conf
(
grep -v "DEVICE=" /etc/sysconfig/network-scripts/ifcfg-eth0
echo "DEVICE=eth1"
) > /etc/sysconfig/network-scripts/cobbler/ifcfg-eth1
# End eth1
# Start eth0
sed -i "s/eth1/eth0/" /etc/modprobe.conf
(
grep -v "DEVICE=" /etc/sysconfig/network-scripts/ifcfg-eth1
echo "DEVICE=eth0"
) > /etc/sysconfig/network-scripts/cobbler/ifcfg-eth0
# End eth0
rm -f /etc/sysconfig/network-scripts/ifcfg-*
mv /etc/sysconfig/network-scripts/cobbler/* /etc/sysconfig/network-scripts/
rm -r /etc/sysconfig/network-scripts/cobbler
cat /etc/modprobe.conf.cobbler >> /etc/modprobe.conf
rm -f /etc/modprobe.conf.cobbler
# End post_install_network_config generated code
From the above, the two sed lines look redundant. What are they
intended to do?
My guess would be it is a cheap workaround for the pci device ordering
in newer 2.6 kernels. This should affect Fedora 10. I can confirm this
"feature not a bug" affects HP DL 3xx servers. Do you remember when we
spoke about this awhile ago on IRC michael? It is very annoying but
can be toggled by setting pci=bfsort or pci=nobfsort in --kopts.
Upstream
kernel.org changed the pci device enumeration code which in
turn flipped the default ethernet device names.
It looks like they change eth0 to eth1 and then eth1 to eth0, but
this
doesn't seme to make since to me.
--
Jeff Schroeder
Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com