On 1/29/10 3:44 PM, James Labocki wrote:
Scott,
Thanks for the reply. Can you expand upon:
"Cobbler doesn't really map to pxe in the standard way. The cobbler
system name isn't exposed to pxe in the way that you are assuming."
Also, per the man page of cobbler in the "SYSTEM" section:
===
name
The system name works like the name option for other commands.
If the name looks like a MAC address or an IP, the name will implicitly be
used for either --mac
or --ip of the first interface, respectively. However, it’s usually better
to give a
descriptive name -- don’t rely on this behavior.
A system created with name "default" has special semantics. If a
default system object exists,
it sets all undefined systems to PXE to a specific profile. Without a
"default" system name
created, PXE will fall through to local boot for unconfigured systems.
When using "default" name, don’t specify any other arguments than
--profile ... they won’t be
used.
===
To me that says that if I use --name=default all undefined machines should use that
profile. Am I misinterpreting the man page? Also, I don't want to modify the PXE
directory directly because if `cobbler sync` is ever run in the future then the contents
will be overwritten.
-James
So looking through the code, I don't think this has ever worked. It
didn't look too hard to implement, so i've attached a patch which should
fix the issue. The patch addresses 2 things:
1. now a /tftpboot/pxelinux.cfg/default file is generated regardless of
whether or not a 'default' system record exists (previously it would not
create this file if the default system exists, which seems completely
wrong).
2. If a "default" cobbler system record exists, it uses it's associated
profile as the timeout menu item, otherwise it uses "local".
James, please let me know how this works for you and I'll submit it to
cobbler-devel for inclusion.
The two files it updates are:
/etc/cobbler/pxe/pxedefault.template
/usr/lib/python2.X/site-packages/cobbler/pxegen.py
-Justin
----- Original Message -----
From: "Scott Henson" <shenson(a)redhat.com>
To: "cobbler" <cobbler(a)lists.fedorahosted.org>
Sent: Friday, January 29, 2010 3:06:20 PM GMT -05:00 US/Canada Eastern
Subject: Re: Cobbler default system not working
Excerpts from James Labocki's message of Fri Jan 29 14:46:45 -0500 2010:
> Using cobbler-1.6.6-3.el5sat
>
> After setting up a default system in cobbler using `cobbler system add --name=default
--profile=rhel5mrg`
>
> systems continue to boot to localdisk instead of using the rhel5mrg profile
>
> # cobbler list
> distro ks-rhel-x86_64-server-5
> distro ks-rhel-x86_64-server-5-u1
> distro ks-rhel-x86_64-server-5-u1:xen
> distro ks-rhel-x86_64-server-5-u2
> distro ks-rhel-x86_64-server-5-u2:xen
> distro ks-rhel-x86_64-server-5-u3
> distro ks-rhel-x86_64-server-5-u3:xen
> distro ks-rhel-x86_64-server-5-u4
> profile coe-mrg-grid:1:Red-Hat
> profile coeiadrhel5base:1:Red-Hat
> distro ks-rhel-x86_64-server-5-u4:xen
> distro ks-rhel-x86_64-server-5:xen
> distro rhel54server64
> profile rhel5mrg
> system 00:1A:4A:0F:45:16
> system default
>
> When I use `cobbler system add --name=default --profile=rhel5mrg
--mac=00:1A:4A:0F:45:16` the system then boots to rhel5mrg. What am I missing?
Cobbler doesn't really map to pxe in the standard way. The cobbler
system name isn't exposed to pxe in the way that you are assuming.
The pxe system is keyed off off the mac address only. You can put a
default directly in pxe (in the normal way) pointing at the rhel54mrg
profile. This will make systems boot by default into the mrg profile.
--
Justin Sherrill, RHCA 1801 Varsity Drive.
Software Engineer Raleigh, NC 27603
Red Hat, Inc.