my work on the web ui
by Greg Swift
So you can follow along here:
https://github.com/gregswift/cobbler.git
or
git://github.com/gregswift/cobbler.git
So far I've only applied a few more cleanup patches aside from all of the
stuph i posted to the list yesterday.
So.. James and I have had a few short conversations about his plans for
cleaning up the web ui of cobbler... He'd already been thinking about and
planning it and I just decided to help. I threw together those mockups from
last weekend, and the few responses seem to have been positive.
i'm not really trying to change actual functionality right now, I'm just
trying to help bring the interface towards his goal of more standard
html+css. so i'm picking up little pieces, and the big bit i'm doing is
restructuring the html away from tables and fieldsets towards divs. Except
for tabular data... tabular data should still be tables. The closest to a
functional change I was looking at was the drop down action list on left
hand side.. and i'm holding off on that for a bit. Occasionally, i am
throwing in a slight change for the sake of consistency and such. I'll
gladly make a note and explain those changes.
Along the way i've found a few little artifacts floating around and have
been submitting patches for those, because they are actually things that
should be fixed regardless of how the re-write work comes along.
12 years, 10 months
[PATCH] exceptions.AttributeError puppet_auto_setup
by Camille Meulien
Hello,
I had this following exception in cobbler 0.25.5:
Sun May 29 11:20:50 2011 - INFO | REMOTE generate_kickstart; user(?)
Sun May 29 11:20:50 2011 - INFO | generate_kickstart
Sun May 29 11:20:50 2011 - INFO | REMOTE run_install_triggers; user(?)
Sun May 29 11:20:50 2011 - DEBUG | running python triggers from
/var/lib/cobbler/triggers/install/post/*
Sun May 29 11:20:50 2011 - DEBUG | running python trigger
cobbler.modules.install_post_log
Sun May 29 11:20:50 2011 - DEBUG | running python trigger
cobbler.modules.install_post_puppet
Sun May 29 11:20:50 2011 - INFO | Exception occured: <type
'exceptions.AttributeError'>
Sun May 29 11:20:50 2011 - INFO | Exception value: puppet_auto_setup
Sun May 29 11:20:50 2011 - INFO | Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 1763, in
_dispatch
return method_handle(*params)
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 1213, in
run_install_triggers
utils.run_triggers(self.api, None,
"/var/lib/cobbler/triggers/install/%s/*" % mode,
additional=[objtype,name,ip],logger=self.logger)
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 860, in
run_triggers
rc = m.run(api, arglist, logger)
File
"/usr/lib/python2.7/site-packages/cobbler/modules/install_post_puppet.py",
line 32, in run
if not str(settings.puppet_auto_setup).lower() in [ "1", "yes", "y",
"true"]:
File "/usr/lib/python2.7/site-packages/cobbler/settings.py", line 166, in
__getattr__
raise AttributeError, name
I fixed it with this change:
--- a/settings.py
+++ b/settings.py
@@ -80,6 +80,7 @@ DEFAULTS = {
"next_server" : "127.0.0.1",
"power_management_default_type" : "ipmitool",
"power_template_dir" : "/etc/cobbler/power",
+ "puppet_auto_setup" : 0,
"pxe_just_once" : 0,
"pxe_template_dir" : "/etc/cobbler/pxe",
"redhat_management_permissive" : 0,
Regards,
--
Camille
HELIOS Technologies
12 years, 11 months
Remote Kickstart
by Matthew Sellers
Hi All,
I have a problem with cobbler using externally sourced kickstart files
that use template variables. It seems that pxegen.py refuses to use
the template service if the kickstart file is externally sourced.
Test:
--
1. configure test profile MyTestProfile with
--kickstart=http://myserver/svn/myrepo/mykickstart_template.ks which
contains template vars such as $local_mirror. Cobbler settings are
configured with: template_remote_kickstarts: 1
2. provide template key/values via ks_meta (ie --> local_mirror :
mylocalmirror.fqdn.com )
3. run cobbler sync
Result:
--
cobbler sync sees that kickstart is not local in pxegen.py and sets
kernel args to be ks=http://myserver/svn/myrepo/kickstart_template.ks
instead of hosting locally with
http://myserver/cblr/op/ks/profile/MyTestProfile.
Problem Location:
--
cobbler-2.0.11 file pxegen.py in PXEGen.build_kernel_options():
---- snippet -----
if system is not None and kickstart_path.startswith("/"):
kickstart_path = "http://%s/cblr/svc/op/ks/system/%s" %
(ipaddress, system.name)
elif kickstart_path.startswith("/"):
kickstart_path = "http://%s/cblr/svc/op/ks/profile/%s" %
(ipaddress, profile.name)
----- /snippet ----
Since my external kickstart_path (http://myserver/<>/*.ks) does not
start with '/' cobbler does not change the ks= parameters to use the
template service and instructs my host to use
http://myserver/svn/myrepo/kickstart_template.ks. This of course
breaks because it is full of unresolved cheetah template variables.
I have worked around this with a little patch on these lines but I
wanted to see if this is a true bug. Ill submit a ticket and patch
if appropriate.
Thank You!
Matt
12 years, 11 months
Cobbler 2.0.11-2
by Scott Henson
Some may have noticed that the Cobbler 2.0.11-1 release did not have a
change log update in the spec file. This release fixes that.
--
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME
12 years, 11 months
Fix for SNIPPET() takes exactly 2 arguments (3 given)
by Michael Mraka
Hi,
Spacewalk users reported issues with cobbler-2.0.10-1.el6 which doesn't
correctly render snippets (RHEL 6 with python-cheetah-2.4.1-1.el6).
(For the full report see
https://www.redhat.com/archives/spacewalk-list/2011-May/msg00148.html)
This issue has been introduced by commit
17fb98f4e26b1428390f453aecb0fcdea8ad633e. And the trouble with the commit is
- a string is always greater than an integer in python.
The fix is attached.
Regards,
--
Michael Mráka
Satellite Engineering, Red Hat
--------------------------------------------------------
--- /usr/lib/python2.6/site-packages/cobbler/templar.py 2011-05-23 05:51:13.208737420 -0400
+++ /usr/lib/python2.6/site-packages/cobbler/templar.py.orig 2011-05-23 05:26:00.211723166 -0400
@@ -32,8 +32,8 @@
import clogger
import time
-from Cheetah import VersionTuple as Cheetah_VersionTuple
-major, minor, release = Cheetah_VersionTuple[0:3]
+import Cheetah
+major, minor, release = Cheetah.Version.split('.')
fix_cheetah_class = False
if major >= 2 and minor >=4 and release >= 2:
fix_cheetah_class = True
12 years, 11 months
[PATCH] have post_install_network_config use default_name_server and default_name_server_search if non-default are completely empty
by Greg Swift
the inheritance of the name_servers and name_servers_search do not
behave as I would expect.
Here is an example setup (best viewed in monospace) :
global -> default_name_servers{,_search} have been set
distro -> no settings for these two values
\-> profile -> has settings for name_servers{,_search}
| \-> system1 -> inherits from its profile
|-> sub-profile -> has different settings for name_servers{,_search}
\-> system2 -> inherits from its profile
Now based on this structure, I would expect system1 to have the
settings from profile and system2 to have the settings from
sub-profile. However, system2 gets the settings from profile. If I
remove the settings from profile, system1 no longer has settings, but
system2 gets the settings from sub-profile.
If I remove the settings from both profile and sub-profile, the system
settings are not inherited from the global configuration pool.
I don't know if this is the "best" way to fix this, but I've attached
what, to me, was the most straight forward fix. I basically patched
the snippet to populate the name_servers and name_servers_search with
values from their respective default value IF they are completely
empty.
If someone would rather iron out the inheritance, I'm up for that.
-greg
12 years, 11 months
[PATCH] make kernel boot options inheritance work in buildiso command
by Jörgen Maas
I wanted to use the buildiso command with the following
distro/profile/system setup:
- on the distro level i had kopt: install=http://whatever/bla
- on the profile level i had kopt: proxy=http://bladiebla
- on the system level i wanted the autoyast=http://bladiebla
I could't get it to work so i came up with the following patch, i've
tested with SLES and CentOS.
12 years, 11 months
[PATCH] add all systems options to cobbler buildiso command
by Jörgen Maas
Hello my fellow cobblers :)
These little patches add the ability to use the "all" keyword for the
"cobbler buildiso --system=" command, also the usage text for this
command has been updated.
I hope the patch format is usable for you guys... (i used diff -u,
will setup a git repo later...)
Have a nice day!
Grtz,
Jorgen Maas
12 years, 11 months