Thanks, Nish.
In answer to your questions:
(1) These machines are in a farm of many tens of machines, so we need things to be
automatic wherever possible. Unnecessary differences need to be avoided. Our multiple
network interfaces are on different networks, so the automation is to configure each
particular interface (ideally constant "n" in "ethn") on each network.
For a given network, each machine should use its "eth<n>", fixed
"<n>". In such a farm it is poor practice, and non-scalable to have to
sign on to each machine to set up interfaces differently from other machines, simply
because the installation process had been inconsistent.
(2) Custom udev would apply to RHEL6 wouldn't it? But this is RHEL5. Is custom udev
available at all for network interfaces on RHEL5? It seems instead to be kudzu and
/etc/sysconfig/hwconf. And that doesn't seem to be settable in advance.
(3) [Use of MAC]. I believe that ultimately the "ifcfg-eth*" files need the
MAC. That's OK. I'm talking about the stage before that, when the system
examines its hardware and by some process that is, sadly, non-deterministic, it maps the
"eth*" names onto those findings.
Finally... is it cobbler-specific? OK, the details we are discussing are not
cobbler-specific. But it seems that the best environment to run this is within the
post-install section of cobbler, before the just-installed system is booted.
Thanks again,.
-- David Lee
----- Original Message -----
From: "Nishanth Aravamudan" <nacc(a)linux.vnet.ibm.com>
To: "David Lee" <david.lee(a)ecmwf.int>
Cc: "cobbler mailing list" <cobbler(a)lists.fedorahosted.org>
Sent: Thursday, 20 September, 2012 6:11:27 PM
Subject: Re: [cobbler] fixing "ifcfg-eth*" to particular hardware
Hi David,
On 20.09.2012 [17:50:52 +0100], David Lee wrote:
Cobbler version: 2.0.11 (actually 2.0.11-2 from RPM)
All systems: RHEL 5.8
[Preliminary: I realise our cobbler version is a little old. I'd
rather not have to upgrade right now, but if it really would make a
substantial difference to the problem I am about to describe, that
could be done.]
We install RHEL 5.8 on many IBM boxes, which are all very similar. In
particular there are four ethernet ports on the system itself, and a
separate board with two 10-Gig ports.
The first ethernet port is our provisioning network, over which
cobbler runs. During installation, it seems to call this "eth2". But
after installation it almost always comes up as "eth0". (That's OK
(although I don't understand it!) but it might interact slightly with
the real problem below.) Moving on...
After installation, the four system ethernet ports usually get
assigned names eth0, eth1, eth2 and eth3, usually in order. (The
cobbler/provisioning interface seems to get "eth0" always.) The two
10-Gig ports get assigned names eth4 and eth5... usually.
But occasionally (perhaps 10% or slightly more) an installation ends
up with a different mapping of names to ports. (If we then
re-install, it usually gets the expected mapping.) That is a problem
when one is (re-)installing machines in a farm of machines that are
supposed to be the same.
So a couple of questions spring to mind.
1) Is the naming somehow critical to your application? I assume so,
because I'm not sure why it's relevant otherwise.
2) If you want static naming of interfaces, I believe the right way of
doing this is custom udev rules (which you might install via cobbler).
3) I think the normal way for this to work is to always use the MAC
address to identify the physical port.
I realise that "cobbler system" has a
"--interface" capability. But I
don't see a way for that to be used to map specific names to specific
hardware.
I make no claims to understand the depths and intricacies of
"/etc/modprobe.conf", "/etc/sysconfig/hwconf", kudzu, etc. But is
there a way (or common practice) somehow to pre-populate various
things with relevant information for the mapping of generated "eth*"
names onto particular ethernet ports?
This isn't really a Cobbler specific question, afaict. I would look into
udev rules, probably, if relevant.
Thanks,
Nish