summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG35
-rw-r--r--cobbler.spec11
-rw-r--r--cobbler/action_sync.py43
-rw-r--r--setup.py6
4 files changed, 65 insertions, 30 deletions
diff --git a/CHANGELOG b/CHANGELOG
index b0aea12..da18f21 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,10 @@
Cobbler CHANGELOG
(all entries mdehaan@redhat.com unless noted otherwise)
-* Wed Dec 20 2006 - 0.3.5-1
+* Thu Dec 21 2006 - 0.3.6
+- Cobbler no longer restarts httpd if the config file already exists.
+
+* Wed Dec 20 2006 - 0.3.5
- Fixed bug in cobbler import related to orphan detection
- Made default rsync.exclude more strict (OO langpacks and KDE translation)
- Now runs createrepo during "cobbler import" to build more correct repodata
@@ -14,19 +17,19 @@ Cobbler CHANGELOG
- rsync repo import shouldn't assume SSH unless no rsync:// in mirror URL
- strict host key checking disabled for "cobbler enchant" feature
-* Mon Dec 05 2006 - 0.3.4-1
+* Mon Dec 05 2006 - 0.3.4
- Don't rsync PPC content or ISO's on cobbler import
- Manpage cleanup
-* Tue Nov 14 2006 - 0.3.3-1
+* Tue Nov 14 2006 - 0.3.3
- During "cobbler sync" only PXE-related directories in /tftpboot
are deleted. This allows /tftpboot to be used for other
purposes.
-* Thr Oct 25 2006 - 0.3.2-1
+* Thr Oct 25 2006 - 0.3.2
- By default, boot and install in text mode
-* Wed Oct 25 2006 - 0.3.1-1
+* Wed Oct 25 2006 - 0.3.1
- The app now refers to "virt" in many places instead of "xen".
It's been coded such that files will migrate forward without
any major issues, and the newer version of koan can still hit
@@ -35,60 +38,60 @@ Cobbler CHANGELOG
now exclusively just uses methods with "virt" in them, however.
- Fixed some bugs related to kickstart templating
-* Tue Oct 24 2006 - 0.3.0-1
+* Tue Oct 24 2006 - 0.3.0
- Reload httpd during sync
- New profiles without set kickstarts default to /etc/cobbler/default.ks
though this can be changed in /var/lib/cobbler/settings
- Better forward upgrades for /var/lib/cobbler/settings. New entries
get added when they are referenced.
-* Tue Oct 24 2006 - 0.2.9-1
+* Tue Oct 24 2006 - 0.2.9
- Bug fix, enchant now detects if koan_path is not set
- import now can do ssh rsync as well as just rsyncd
- Misc bug fixes related to not choking on bad info
- Fixed bug where --pxe-address wasn't surfaced
- Sync is a little less verbose
-* Wed Oct 18 2006 - 0.2.8-1
+* Wed Oct 18 2006 - 0.2.8
- Performance speedups to "import" command
- Bug fix, imported paths (again) convert slashes to underscores
-* Tue Oct 17 2006 - 0.2.7-1
+* Tue Oct 17 2006 - 0.2.7
- Removed pexpect to enhance support for other distros
- enchant syntax changed (see NEWS)
- now builds on RHEL4
-* Tue Oct 17 2006 - 0.2.6-1
+* Tue Oct 17 2006 - 0.2.6
- Removing Cheetah and replacing w/ simpler templating system
- Don't delete localmirror on sync
-* Mon Oct 16 2006 - 0.2.5-1
+* Mon Oct 16 2006 - 0.2.5
- New "import" feature for rsync:// mirrors and filesystem directories
- Manpage clarification
- "enchant" is now a subcommand of "cobbler system" and takes less arguments.
- Several random bugfixes (mainly along error paths)
-* Wed Oct 11 2006 - 0.2.4-1
+* Wed Oct 11 2006 - 0.2.4
- Changes to make things work with python 2.3 (RHEL4, etc)
- Updated YAML code to ensure better backward compatibility
-* Mon Oct 9 2006 - 0.2.3-1
+* Mon Oct 9 2006 - 0.2.3
- Cobbler now creates a profile and system listing (YAML) in /var needed
by the next version of koan (which will be 0.2.1)
- bugfix: enchant should reboot the target box
- bugfix: enchant should fail if path to koan isn't configured
-* Fri Oct 6 2006 - 0.2.2-1
+* Fri Oct 6 2006 - 0.2.2
- bugfix: "--pxe-hostname" made available in CLI and renamed as "--pxe-address"
- workaround: elilo doesn't do MAC address pxe config files, use IP for ia64
- bugfix: added next-server line for per-MAC dhcp configs
- bugfix: fixed manpage errors
-* Thu Sep 28 2006 - 0.2.1-1
+* Thu Sep 28 2006 - 0.2.1
- New ability to "enchant" remote systems (see NEWS)
- Misc. bugfixes
-* Fri Sep 22 2006 - 0.2.0-1
+* Fri Sep 22 2006 - 0.2.0
- New dhcp.d conf management features (see NEWS)
- IA64 support (see NEWS)
- dhcpd.conf MAC & hostname association features
diff --git a/cobbler.spec b/cobbler.spec
index ba5935c..b663a89 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -2,7 +2,7 @@
Summary: Boot server configurator
Name: cobbler
-Version: 0.3.5
+Version: 0.3.6
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
License: GPL
@@ -20,7 +20,7 @@ Url: http://cobbler.et.redhat.com
%description
-Cobbler is a command line tool for configuration of boot/provisioning servers. It is also accessible as a Python library. Cobbler supports PXE, provisioning virtualized ("virt") images, and reinstalling machines that are already up and running (over SSH). The last two modes require a helper tool called 'koan' that integrates with cobbler. Cobbler's advanced features include importing distributions from rsync mirrors, kickstart templating, and managing dhcpd.conf.
+Cobbler is a command line tool for configuration of boot/provisioning, and update servers which is also accessible as a Python library. Cobbler supports PXE, provisioning virtualized images, and reinstalling machines that are already up and running (over SSH). The last two modes require a helper tool called 'koan' that integrates with cobbler. Cobbler's advanced features include importing distributions from rsync mirrors, kickstart templating, integrated yum mirroring (and linking repository setup with kickstarts), plus managing dhcpd.conf.
%prep
%setup -q
@@ -57,9 +57,14 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%changelog
-* Wed Dec 20 2006 Michael DeHaan <mdehaan@redhat.com> - 0.3.5-1
+* Thu Dec 21 2006 Michael DeHaan <mdehaan@redhat.com> - 0.3.6-1
+- Upstream changes (see CHANGELOG)
+- Description updated
+
+* Thu Dec 21 2006 Michael DeHaan <mdehaan@redhat.com> - 0.3.5-4
- Upstream changes (see CHANGELOG)
- Added createrepo as Requires
+- BuildRequires: python-devel (needed for 2.5)
* Tue Dec 05 2006 Michael DeHaan <mdehaan@redhat.com> - 0.3.4-1
- Upstream changes (see CHANGELOG)
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 362eec1..f2d0df1 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -55,6 +55,7 @@ class BootSync:
raise cexceptions.CobblerException("no_dir",self.settings.tftpboot)
# not having a /var/www/cobbler is ok, the app will create it since
# no other package has to own it.
+ self.needs_http_restart = False
self.verbose = verbose
self.dryrun = dryrun
self.clean_trees()
@@ -66,14 +67,18 @@ class BootSync:
self.build_trees()
if self.settings.manage_dhcp:
self.write_dhcp_file()
- try:
- retcode = self.service("dhcpd", "restart")
- if retcode != 0:
- print >>sys.stderr, "Warning: dhcpd restart failed"
- except OSError, e:
- print >>sys.stderr, "Warning: dhcpd restart failed: ", e
+ self.restart_dhcp()
+ # self.consider_restarting_apache()
return True
+ def restart_dhcp(self):
+ try:
+ retcode = self.service("dhcpd", "restart")
+ if retcode != 0:
+ print >>sys.stderr, "Warning: dhcpd restart failed"
+ except OSError, e:
+ print >>sys.stderr, "Warning: dhcpd restart failed: ", e
+
def copy_koan(self):
koan_path = self.settings.koan_path
print "koan path = %s" % koan_path
@@ -152,10 +157,30 @@ class BootSync:
Create a config file to Apache that will allow access to the
cobbler infrastructure available over TFTP over HTTP also.
"""
+
+ conf_file = "/etc/httpd/conf.d/cobbler.conf"
+ self.needs_http_restart = True
+
if not os.path.exists("/etc/httpd/conf.d"):
print cobbler_msg.lookup("no_httpd")
return
- f = self.open_file("/etc/httpd/conf.d/cobbler.conf","w+")
+
+ # now we're going to figure out whether we actually need to write
+ # the file. If the file exists and contains self.settings.webdir,
+ # then we don't. and if the file is already there, then we really
+ # don't have to restart the service either.
+
+ if os.path.exists(conf_file):
+ fh = open(conf_file, "r")
+ data = fh.read()
+ if data.find(self.settings.webdir) != -1:
+ self.needs_http_restart=False
+ fh.close()
+
+ if not self.needs_http_restart:
+ return
+
+ f = self.open_file(conf_file,"w+")
config_data = """
#
# This configuration file allows 'cobbler' boot info
@@ -172,7 +197,9 @@ class BootSync:
config_data = config_data.replace("/cobbler_webdir",self.settings.webdir)
self.tee(f, config_data)
self.close_file(f)
- self.service("httpd", "reload")
+
+ if self.needs_http_restart:
+ self.service("httpd", "reload")
def clean_trees(self):
"""
diff --git a/setup.py b/setup.py
index cae540e..4bd325b 100644
--- a/setup.py
+++ b/setup.py
@@ -4,10 +4,10 @@ import sys
from distutils.core import setup, Extension
import string
-VERSION = "0.3.5"
-SHORT_DESC = "Boot server configurator"
+VERSION = "0.3.6"
+SHORT_DESC = "Boot and update server configurator"
LONG_DESC = """
-Cobbler is a command line tool for configuration of boot/provisioning servers. It is also accessible as a Python library. Cobbler supports PXE, provisioning virtualized ("virt") images, and reinstalling machines that are already up and running (over SSH). The last two modes require a helper tool called 'koan' that integrates with cobbler. Cobbler's advanced features include importing distributions from rsync mirrors, kickstart templating, and managing dhcpd.conf.
+Cobbler is a command line tool for configuration of boot/provisioning, and update servers which is also accessible as a Python library. Cobbler supports PXE, provisioning virtualized images, and reinstalling machines that are already up and running (over SSH). The last two modes require a helper tool called 'koan' that integrates with cobbler. Cobbler's advanced features include importing distributions from rsync mirrors, kickstart templating, integrated yum mirroring (and linking repository setup with kickstarts), plus managing dhcpd.conf.
"""
if __name__ == "__main__":