From 6fc697a71cf29ad66b0e2324998c35b0adbdbff9 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 20 Dec 2007 15:32:52 -0500 Subject: Rename some templates, remove proxy logic that is not necc. for new performance plans, remove watcher.py reference --- CHANGELOG | 2 ++ cobbler.spec | 13 +++-------- cobbler/action_import.py | 6 ++--- cobbler/action_sync.py | 17 ++++++-------- cobbler/collection.py | 30 ++----------------------- kickstarts/kickstart_fc5.ks | 46 -------------------------------------- kickstarts/kickstart_fc6.ks | 48 ---------------------------------------- kickstarts/kickstart_fc6_domU.ks | 41 ---------------------------------- kickstarts/legacy.ks | 46 ++++++++++++++++++++++++++++++++++++++ kickstarts/sample.ks | 48 ++++++++++++++++++++++++++++++++++++++++ setup.py | 5 ++--- 11 files changed, 113 insertions(+), 189 deletions(-) delete mode 100644 kickstarts/kickstart_fc5.ks delete mode 100644 kickstarts/kickstart_fc6.ks delete mode 100644 kickstarts/kickstart_fc6_domU.ks create mode 100644 kickstarts/legacy.ks create mode 100644 kickstarts/sample.ks diff --git a/CHANGELOG b/CHANGELOG index d6cf6b1..0b82869 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,8 @@ Cobbler CHANGELOG - performance testing scripts (in source checkout) - webui now uses Apache logging - misc webui fixes +- remove -b from wgets since busybox doesn't have -b in wget +- rename default/sample kickstarts to avoid confusion - ... * Wed Nov 14 2007 - 0.6.4 diff --git a/cobbler.spec b/cobbler.spec index 7a3ab25..3aac41c 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -118,16 +118,8 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT %{_bindir}/cobblerd %{_bindir}/cobbler_auth_help %dir /etc/cobbler -%config(noreplace) /etc/cobbler/default.ks -%config(noreplace) /etc/cobbler/kickstart_fc5.ks -%config(noreplace) /etc/cobbler/kickstart_fc6.ks -%config(noreplace) /etc/cobbler/kickstart_fc6_domU.ks -%config(noreplace) /etc/cobbler/dhcp.template -%config(noreplace) /etc/cobbler/dnsmasq.template -%config(noreplace) /etc/cobbler/pxedefault.template -%config(noreplace) /etc/cobbler/pxeprofile.template -%config(noreplace) /etc/cobbler/pxesystem.template -%config(noreplace) /etc/cobbler/pxesystem_ia64.template +%config(noreplace) /etc/cobbler/*.ks +%config(noreplace) /etc/cobbler/*.template %config(noreplace) /etc/cobbler/rsync.exclude %config(noreplace) /etc/logrotate.d/cobblerd_rotate %config(noreplace) /etc/cobbler/modules.conf @@ -191,6 +183,7 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT * Fri Dec 15 2007 Michael DeHaan - 0.7.1-1 - Upstream changes (see CHANGELOG) +- Generalize what files are included in RPM * Thu Dec 14 2007 Michael DeHaan - 0.7.0-1 - Upstream changes (see CHANGELOG), testing branch diff --git a/cobbler/action_import.py b/cobbler/action_import.py index d2f2d05..867b950 100644 --- a/cobbler/action_import.py +++ b/cobbler/action_import.py @@ -256,12 +256,12 @@ class Importer: def set_kickstart(self, profile, flavor, major, minor): if flavor == "fedora": if major >= 6: - return profile.set_kickstart("/etc/cobbler/kickstart_fc6.ks") + return profile.set_kickstart("/etc/cobbler/sample.ks") if flavor == "redhat" or flavor == "centos": if major >= 5: - return profile.set_kickstart("/etc/cobbler/kickstart_fc6.ks") + return profile.set_kickstart("/etc/cobbler/sample.ks") print _("- using default kickstart file choice") - return profile.set_kickstart("/etc/cobbler/kickstart_fc5.ks") + return profile.set_kickstart("/etc/cobbler/legacy.ks") # --------------------------------------------------------------------- diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index 47069bc..f94ca59 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -387,10 +387,9 @@ class BootSync: # FIXME: watcher is more of a request than a packaged file # we should eventually package something and let it do something important" - pattern1 = "wget \"http://%s/cblr/watcher.py?%s_%s=%s\"" - pattern2 = "wget \"http://%s/cgi-bin/cobbler/nopxe.cgi?system=%s\"" - pattern3 = "wget \"http://%s/cobbler/%s/%s/ks.cfg\" -O /root/cobbler.ks" - pattern4 = "wget \"http://%s/cgi-bin/cobbler/post_install_trigger.cgi?system=%s\"" + pattern1 = "wget \"http://%s/cgi-bin/cobbler/nopxe.cgi?system=%s\"" + pattern2 = "wget \"http://%s/cobbler/%s/%s/ks.cfg\" -O /root/cobbler.ks" + pattern3 = "wget \"http://%s/cgi-bin/cobbler/post_install_trigger.cgi?system=%s\"" blend_this = profile if system: @@ -401,18 +400,16 @@ class BootSync: buf = "" if system is not None: - buf = buf + pattern1 % (blended["server"], "system", "done", system.name) if str(self.settings.pxe_just_once).upper() in [ "1", "Y", "YES", "TRUE" ]: - buf = buf + "\n" + pattern2 % (blended["server"], system.name) + buf = buf + "\n" + pattern1 % (blended["server"], system.name) if kickstart and os.path.exists(kickstart): - buf = buf + "\n" + pattern3 % (blended["server"], "kickstarts_sys", system.name) + buf = buf + "\n" + pattern2 % (blended["server"], "kickstarts_sys", system.name) if self.settings.run_post_install_trigger: - buf = buf + "\n" + pattern4 % (blended["server"], system.name) + buf = buf + "\n" + pattern3 % (blended["server"], system.name) else: - buf = buf + pattern1 % (blended["server"], "profile", "done", profile.name) if kickstart and os.path.exists(kickstart): - buf = buf + "\n" + pattern3 % (blended["server"], "kickstarts", profile.name) + buf = buf + "\n" + pattern2 % (blended["server"], "kickstarts", profile.name) return buf diff --git a/cobbler/collection.py b/cobbler/collection.py index a06a663..2fe3967 100644 --- a/cobbler/collection.py +++ b/cobbler/collection.py @@ -27,31 +27,6 @@ import item_repo from rhpl.translate import _, N_, textdomain, utf8 -class ProxiedItem: - - def __init__(self,collection,seed_data): - - self.real_object = None - self.collection = collection - self.config = collection.config - self.seed_data = seed_data - - - def __getattr__(self,name): - - if self.real_object is not None: - return getattr(self.real_object,name) - - if name == "name": - return self.seed_data["name"] - - self.real_object = self.collection.factory_produce( - self.config, - self.seed_data - ) - - return getattr(self.real_object, name) - class Collection(serializable.Serializable): def __init__(self,config): @@ -120,9 +95,8 @@ class Collection(serializable.Serializable): if datastruct is None: return for seed_data in datastruct: - #item = self.factory_produce(self.config,seed_data) - #self.add(item) - self.add(ProxiedItem(self,seed_data)) + item = self.factory_produce(self.config,seed_data) + self.add(item) def add(self,ref,save=False,with_copy=False,with_triggers=True,with_sync=True,quick_pxe_update=False): """ diff --git a/kickstarts/kickstart_fc5.ks b/kickstarts/kickstart_fc5.ks deleted file mode 100644 index 84bd1e2..0000000 --- a/kickstarts/kickstart_fc5.ks +++ /dev/null @@ -1,46 +0,0 @@ -#platform=x86, AMD64, or Intel EM64T -# System authorization information -auth --useshadow --enablemd5 -# System bootloader configuration -bootloader --location=mbr -# Partition clearing information -clearpart --all --initlabel -# Use text mode install -text -# Firewall configuration -firewall --enabled -# Run the Setup Agent on first boot -firstboot --disable -# System keyboard -keyboard us -# System language -lang en_US -# Use network installation -url --url=$tree -# Network information -network --bootproto=dhcp --device=eth0 --onboot=on -# Reboot after installation -reboot - -#Root password -rootpw --iscrypted \$1\$mF86/UHC\$WvcIcX2t6crBz2onWxyac. -# SELinux configuration -selinux --disabled -# Do not configure the X Window System -skipx -# System timezone -timezone America/New_York -# Install OS instead of upgrade -install -# Clear the Master Boot Record -zerombr - -# Magically figure out how to partition this thing -SNIPPET::partition_select - -%packages - -%post -$yum_config_stanza -$kickstart_done - diff --git a/kickstarts/kickstart_fc6.ks b/kickstarts/kickstart_fc6.ks deleted file mode 100644 index 5208ed7..0000000 --- a/kickstarts/kickstart_fc6.ks +++ /dev/null @@ -1,48 +0,0 @@ -#platform=x86, AMD64, or Intel EM64T -# System authorization information -auth --useshadow --enablemd5 -# System bootloader configuration -bootloader --location=mbr -# Partition clearing information -clearpart --all --initlabel -# Use text mode install -text -# Firewall configuration -firewall --enabled -# Run the Setup Agent on first boot -firstboot --disable -# System keyboard -keyboard us -# System language -lang en_US -# Use network installation -url --url=$tree -# If any cobbler repo definitions were referenced in the kickstart profile, include them here. -$yum_repo_stanza -# Network information -network --bootproto=dhcp --device=eth0 --onboot=on -# Reboot after installation -reboot - -#Root password -rootpw --iscrypted \$1\$mF86/UHC\$WvcIcX2t6crBz2onWxyac. -# SELinux configuration -selinux --disabled -# Do not configure the X Window System -skipx -# System timezone -timezone America/New_York -# Install OS instead of upgrade -install -# Clear the Master Boot Record -zerombr - -# Magically figure out how to partition this thing -SNIPPET::partition_select - -%packages - -%post -$yum_config_stanza -$kickstart_done - diff --git a/kickstarts/kickstart_fc6_domU.ks b/kickstarts/kickstart_fc6_domU.ks deleted file mode 100644 index 14eccb2..0000000 --- a/kickstarts/kickstart_fc6_domU.ks +++ /dev/null @@ -1,41 +0,0 @@ -# DomU kickstart for Fedora Server Spin -# Installs 142 packages / 560MB -# Tested with FC6 - -install -reboot -url --url=$tree - -lang en_US.UTF-8 -keyboard us -xconfig --driver "fbdev" --resolution 800x600 --depth 24 -network --device eth0 --bootproto dhcp -rootpw --iscrypted \$1\$mF86/UHC\$WvcIcX2t6crBz2onWxyac. -firewall --enabled --port=22:tcp -authconfig --enableshadow --enablemd5 -selinux --disabled -timezone --utc America/New_York -bootloader --location=mbr --driveorder=xvda --append="rhgb quiet" - -clearpart --all --initlabel --drives=xvda -part /boot --fstype ext3 --size=100 --ondisk=xvda -part pv.2 --size=0 --grow --ondisk=xvda -volgroup domu --pesize=32768 pv.2 -logvol / --fstype ext3 --name=lv00 --vgname=domu --size=1024 --grow -logvol swap --fstype swap --name=lv01 --vgname=domu --size=272 --grow --maxsize=544 -$yum_repo_stanza - -%packages --nobase -crontabs -dhclient -dhcpv6_client -nfs-utils -openssh-clients -openssh-server -yum -wget - -%post -$yum_config_stanza -$kickstart_done - diff --git a/kickstarts/legacy.ks b/kickstarts/legacy.ks new file mode 100644 index 0000000..84bd1e2 --- /dev/null +++ b/kickstarts/legacy.ks @@ -0,0 +1,46 @@ +#platform=x86, AMD64, or Intel EM64T +# System authorization information +auth --useshadow --enablemd5 +# System bootloader configuration +bootloader --location=mbr +# Partition clearing information +clearpart --all --initlabel +# Use text mode install +text +# Firewall configuration +firewall --enabled +# Run the Setup Agent on first boot +firstboot --disable +# System keyboard +keyboard us +# System language +lang en_US +# Use network installation +url --url=$tree +# Network information +network --bootproto=dhcp --device=eth0 --onboot=on +# Reboot after installation +reboot + +#Root password +rootpw --iscrypted \$1\$mF86/UHC\$WvcIcX2t6crBz2onWxyac. +# SELinux configuration +selinux --disabled +# Do not configure the X Window System +skipx +# System timezone +timezone America/New_York +# Install OS instead of upgrade +install +# Clear the Master Boot Record +zerombr + +# Magically figure out how to partition this thing +SNIPPET::partition_select + +%packages + +%post +$yum_config_stanza +$kickstart_done + diff --git a/kickstarts/sample.ks b/kickstarts/sample.ks new file mode 100644 index 0000000..5208ed7 --- /dev/null +++ b/kickstarts/sample.ks @@ -0,0 +1,48 @@ +#platform=x86, AMD64, or Intel EM64T +# System authorization information +auth --useshadow --enablemd5 +# System bootloader configuration +bootloader --location=mbr +# Partition clearing information +clearpart --all --initlabel +# Use text mode install +text +# Firewall configuration +firewall --enabled +# Run the Setup Agent on first boot +firstboot --disable +# System keyboard +keyboard us +# System language +lang en_US +# Use network installation +url --url=$tree +# If any cobbler repo definitions were referenced in the kickstart profile, include them here. +$yum_repo_stanza +# Network information +network --bootproto=dhcp --device=eth0 --onboot=on +# Reboot after installation +reboot + +#Root password +rootpw --iscrypted \$1\$mF86/UHC\$WvcIcX2t6crBz2onWxyac. +# SELinux configuration +selinux --disabled +# Do not configure the X Window System +skipx +# System timezone +timezone America/New_York +# Install OS instead of upgrade +install +# Clear the Master Boot Record +zerombr + +# Magically figure out how to partition this thing +SNIPPET::partition_select + +%packages + +%post +$yum_config_stanza +$kickstart_done + diff --git a/setup.py b/setup.py index fddcba3..bd24493 100644 --- a/setup.py +++ b/setup.py @@ -85,9 +85,8 @@ if __name__ == "__main__": (cobpath, ['loaders/menu.c32']), # sample kickstart files - (etcpath, ['kickstarts/kickstart_fc5.ks']), - (etcpath, ['kickstarts/kickstart_fc6.ks']), - (etcpath, ['kickstarts/kickstart_fc6_domU.ks']), + (etcpath, ['kickstarts/legacy.ks']), + (etcpath, ['kickstarts/sample.ks']), (etcpath, ['kickstarts/default.ks']), # templates for DHCP and syslinux configs -- cgit