diff --git a/cobbler-revert-ipmi.patch b/cobbler-revert-ipmi.patch new file mode 100644 index 0000000..3a9f8b1 --- /dev/null +++ b/cobbler-revert-ipmi.patch @@ -0,0 +1,60 @@ +commit be66a95e926870d1518c8ee51bde6af63356c3ab +Author: Orion Poplawski +Date: Mon Nov 26 11:37:14 2018 -0700 + + Revert "Adding a feature to allow manage_bind to manage ipmi A records, if power_address is an IP." + + This reverts commit 21ae5f127983b3eb8dee16c1a5249f2b564e5ae6. + + This is broken on 2.8 because it does not support settings.d. + +diff --git a/cobbler/modules/manage_bind.py b/cobbler/modules/manage_bind.py +index f58ebd8..04ec377 100644 +--- a/cobbler/modules/manage_bind.py ++++ b/cobbler/modules/manage_bind.py +@@ -30,7 +30,6 @@ import cobbler.clogger as clogger + + from cobbler.utils import _ + from cobbler.cexceptions import CX +-import socket + + + def register(): +@@ -149,29 +148,6 @@ class BindManager: + # strip the zone off the dns_name + host = re.sub('\.%s$' % best_match, '', host) + +- # if we are to manage ipmi hosts, add that too +- if (self.settings.bind_manage_ipmi): +- if (system.power_address != ""): +- power_address_is_ip = False +- # see if the power address is an IP +- try: +- socket.inet_aton(system.power_address) +- power_address_is_ip = True +- except socket.error: +- power_address_is_ip = False +- +- # if the power address is an IP, then add it to the DNS +- # with the host suffix of "-ipmi" +- # TODO: Perhpas the suffix can be configurable through settings? +- if(power_address_is_ip): +- ipmi_host = host + "-ipmi" +- ipmi_ips = [] +- ipmi_ips.append(system.power_address) +- try: +- zones[best_match][ipmi_host] = ipmi_ips + zones[best_match][ipmi_host] +- except KeyError: +- zones[best_match][ipmi_host] = ipmi_ips +- + # Create a list of IP addresses for this host + ips = [] + if ip: +diff --git a/config/cobbler/settings.d/bind_manage_ipmi.settings b/config/cobbler/settings.d/bind_manage_ipmi.settings +deleted file mode 100644 +index 06e6d45..0000000 +--- a/config/cobbler/settings.d/bind_manage_ipmi.settings ++++ /dev/null +@@ -1,2 +0,0 @@ +-# bind_manage_ipmi - used to let bind manage IPMI addresses if the power management address is an IP and if manage_bind is set. +-bind_manage_ipmi: 1 diff --git a/cobbler.spec b/cobbler.spec index 1d6cdf9..82e8cfe 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -7,13 +7,17 @@ Name: cobbler Version: 2.8.4 -Release: 2%{?dist} +Release: 4%{?dist} Summary: Boot server configurator URL: http://cobbler.github.io/ License: GPLv2+ Source0: https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# Revert ipmi feature - broken in 2.8 +# https://github.com/cobbler/cobbler/issues/1907 +Patch0: cobbler-revert-ipmi.patch BuildRequires: git +BuildRequires: /usr/bin/pathfix.py BuildRequires: python2-devel BuildRequires: python2-pyyaml BuildRequires: python2-setuptools @@ -115,6 +119,7 @@ of an existing system. For use with a boot-server configured with Cobbler %prep %autosetup -p1 +pathfix.py -pni "%{__python2} %{py2_shbang_opts}" . %build %py2_build @@ -259,6 +264,12 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/ %changelog +* Mon Nov 26 2018 Orion Poplawski - 2.8.4-4 +- Revert bind_manage_ipmi feature that is broken on 2.8 + +* Sun Nov 25 2018 Orion Poplawski - 2.8.4-3 +- Use pathfix.py to fix python shebangs + * Sun Nov 25 2018 Orion Poplawski - 2.8.4-2 - Make koan require python2-ethtool (BZ 1638933)