On Wed, Mar 28, 2012 at 11:24 AM, Nishanth Aravamudan
<n...@linux.vnet.ibm.com> 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 <n...@us.ibm.com>
>
> 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.

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.
_______________________________________________
cobbler-devel mailing list
cobbler-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel

Reply via email to