On 28.03.2012 [18:40:09 -0500], James Cammarata wrote: > On Wed, Mar 28, 2012 at 11:24 AM, Nishanth Aravamudan > <[email protected]> wrote: > > Hi, > > > > I encountered a rather annoying problem with cobbler for ppc64 systems. > > The way these machines netboot is controlled by the SMS configuration, > > and if the SMS menu receives a DHCP response, even if it eventually > > fails, it will stay in an infinite loop within the netboot code. That > > code is not modifiable by me (owned by system firmware). What I > > encountered with Cobbler was that after an install succeeded, the DHCP > > configuration file was left alone. So the DHCP server would respond on > > the network on the next boot and the target server never booted from the > > disk. > > > > I worked around this by only generating the DHCP configuration if a > > system does have netboot_enabled set and re-generating the DHCP files > > via sync() whenever disable_netboot() is called. > > > > Signed-off-by: Nishanth Aravamudan <[email protected]> > > > > diff --git a/cobbler/modules/manage_isc.py b/cobbler/modules/manage_isc.py > > index b8f857f..8681d94 100644 > > --- a/cobbler/modules/manage_isc.py > > +++ b/cobbler/modules/manage_isc.py > > @@ -161,6 +161,9 @@ class IscManager: > > interface["owner"] = blended_system["name"] > > interface["enable_gpxe"] = blended_system["enable_gpxe"] > > > > + if not interface["netboot_enabled"]: > > + continue > > + > > interface["filename"] = "/pxelinux.0" > > # can't use pxelinux.0 anymore > > if distro is not None: > > diff --git a/cobbler/remote.py b/cobbler/remote.py > > index 0035e34..28cf180 100644 > > --- a/cobbler/remote.py > > +++ b/cobbler/remote.py > > @@ -1166,6 +1166,8 @@ class CobblerXMLRPCInterface: > > obj.set_netboot_enabled(0) > > # disabling triggers and sync to make this extremely fast. > > > > systems.add(obj,save=True,with_triggers=False,with_sync=False,quick_pxe_update=True) > > + # re-generate dhcp configuration > > + self.api.sync() > > return True > > > > def upload_log_data(self, sys_name, file, size, offset, data, > > token=None,**rest): > > > > -- > > Does this still happen if you use the cobbler trigger to set > netboot-enabled to false? Not sure if that's a valid option for > whatever OS you're building or not but take a look at the > kickstart_done snippet.
I'm not sure I understand entirely. I have 'pxe_just_once' set to 1 in my /etc/cobbler/settings, and that does nicely unset the netboot enabled flag for the systems that are net-installed. However, the problem I saw (and I can try and test without my changes to re-confirm this) is that the DHCP server is still configured to respond over the network when this flag is changed (by default), so the netbooting machine gets a DHCP response, but the netboot environment no longer exists, and we fail. But system firmware is so dumb in this instnace that it just cycles there, rather than failing over ... > Forcing a full sync every time a system changes the netboot-enabled > flag is probably not a good solution though, as this is a very > time-consuming operation for cobbler installations with a large number > of distros/systems/profiles. Unfortunately, ISC's dhcpd doesn't have a > great CLI command option so doing dynamic updates doesn't seem to > work, unless someone can point me to some good docs on the subject. > Everything I've found says the CLI management tool is spotty at best. Would it be possible to perhaps add a 'dhcpsync()' variant of sync that only ensured the DHCP configuration was updated (with the above chnage to ensure netboot disabled servers weren't listed)? If not, I'm happy to carry the above chagne locally. Thanks, Nish -- Nishanth Aravamudan <[email protected]> IBM Linux Technology Center _______________________________________________ cobbler-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler-devel
