On 28.03.2012 [18:40:09 -0500], James Cammarata wrote:
On Wed, Mar 28, 2012 at 11:24 AM, Nishanth Aravamudan
<nacc(a)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 <nacc(a)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.
I am looking at kick_start_done and not entirely sure what it does :) I
see it echo's values at the end, but I'm not sure how that ties to
anything else?
I will note that with pxe_just_once (which I have set here), the
netboot_enabled flag does get unset after installation, but as I
mentioned in my other e-mail that's insufficient for yaboot.
Thanks,
Nish
--
Nishanth Aravamudan <nacc(a)us.ibm.com>
IBM Linux Technology Center