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):
--
Nishanth Aravamudan <nacc(a)us.ibm.com>
IBM Linux Technology Center