From 84ffb0d64cf7d586fa412ea9b22863cfb1ff0f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rgen=20Maas?= Date: Thu, 14 Jul 2016 21:53:03 +0200 Subject: [PATCH] Add dhcp_tag field to slave interfaces in manage_isc.py. This change allows for PXE booting from system records containing a bonded interface configuration. Without this dhcp_tag the slave interfaces would not be included in the dhcp_tags dict used in dhcp.template. --- cobbler/modules/manage_isc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cobbler/modules/manage_isc.py b/cobbler/modules/manage_isc.py index d3dc077643..2c7d93adc1 100644 --- a/cobbler/modules/manage_isc.py +++ b/cobbler/modules/manage_isc.py @@ -59,7 +59,7 @@ def __init__(self, collection_mgr, logger): def write_dhcp_file(self): """ DHCP files are written when manage_dhcp is set in - /var/lib/cobbler/settings. + /etc/cobbler/settings. """ template_file = "/etc/cobbler/dhcp.template" @@ -106,6 +106,7 @@ def write_dhcp_file(self): # exist continue ip = system.interfaces[interface["interface_master"]]["ip_address"] + dtag = system.interfaces[interface["interface_master"]]["dhcp_tag"] if ip is None or ip == "": for (nam2, int2) in system.interfaces.iteritems(): if (nam2.startswith(interface["interface_master"] + ".") and int2["ip_address"] is not None and int2["ip_address"] != ""): @@ -117,6 +118,7 @@ def write_dhcp_file(self): interface["if_gateway"] = system.interfaces[interface["interface_master"]]["if_gateway"] else: ip = interface["ip_address"] + dtag = interface["dhcp_tag"] host = interface["dns_name"] if distro is not None: @@ -165,7 +167,7 @@ def write_dhcp_file(self): else: interface["filename"] = yaboot - dhcp_tag = interface["dhcp_tag"] + dhcp_tag = dtag if dhcp_tag == "": dhcp_tag = "default"