We've been using cobbler for some time and I've noticed that the pxe files
are generated in the /tftpboot/pxe/grub and /tftpboot/pxe/pxelinux.cfg
directories for systems regardless of whether or not netboot is enabled for
a system. I'm assuming this hasn't been a problem for most people who are
letting cobbler manage dhcp. I'm guessing the dhcp config is manipulated so
once netboot is disabled, it removes the boot file from the config. We are
using cobbler in a slightly unconventional way as it pertains to dhcp/pxe.
We use the pxe files generated by cobbler, but they are accessed via a
tfp/dhcp server that is not managed by cobbler. This is done because we
have other systems getting managed outside of cobbler that also generate
pxe configurations.
I'm wondering if there is a reason these pxe files are not removed when the
host has netboot disabled.
As a test, I modified the code (this is 2.2.3-2) in
/usr/lib/python2.6/site-packages/cobbler/pxegen.py line 279 and added (and
system.netboot_enabled):
os.symlink("../yaboot", f3)
else:
continue
>> if system.is_management_supported() and system.netboot_enabled:
if not image_based:
self.write_pxe_file(f2, system, profile, distro,
working_arch)
if grub_path:
self.write_pxe_file(grub_path, system, profile,
distro,
working_arch, format="grub")
else:
self.write_pxe_file(f2, system, None, None,
working_arch, image=profile)
else:
# ensure the file doesn't exist
utils.rmfile(f2)
if grub_path:
utils.rmfile(grub_path)
This change had the desired affect. Is this something that can be patched
into the code, or am I missing something?
--
-
Steven Seed
Sr Systems Engineer
Walt Disney Animation Studios
818-460-9453