web directory clean-up
by J's Mail
I'm mounting /var/www/cobbler from NFS. It's Netapp, so there's a
'.snapshot' directory. 'cobbler sync' wants to remove/clean-up this
directory. Nothing happens, as .snapshot is read-only, but there's a
noticable delay as the command runs.
At first blush, the change is simple: whitelist the directory in
action_sync.py. However, I'm not a fan of this approach because a version
upgrade could lose this change. More preferable, I believe, would be a
file with whitelisted directories. Thoughts?
Finally, thanks for all the hard work; it's great software.
-- Jess
9 years, 7 months
Bug introduced by 74bda5972fff ("More refactoring around input validation."
by Nishanth Aravamudan
This commit (afaict, not bisected, as I'm trying to get my server up &
running) broke the web UI. It removed the "<<inherit>>" entry from the
dropdown for systems' kickstarts. The default became "" (added in a
separate commit) -- but then provided no means to set the kickstart as
inherited again.
The simple change below
--- a/web/cobbler_web/views.py
+++ b/web/cobbler_web/views.py
@@ -1108,6 +1108,7 @@ def generic_edit(request, what=None, obj_name=None, editmode="new"):
# allow for an empty value in the webui
kickstart_list = remote.get_kickstart_templates()
kickstart_list.append("")
+ kickstart_list.append("<<inherit>>")
kickstart_list.sort()
# populate some select boxes
got me working again, but seems like a workaround possibly for something
not expexpected.
Just an FYI, these "refactoring" changes seem like they are also
changing functionality -- dunno if that's ideal, it would be nice if the
commits were a bit more split up. But I appreciate all the improvements
I'm seeing!
-Nish
9 years, 8 months
Bug introduced by eb3c8d35c481 (Get rid of deprecated "bonding" field")
by Nishanth Aravamudan
With this commit applied, I get the following error when trying to
render snippets/post_install_network_config_deb as invoked by
sample.preseed:
Thu Aug 28 16:34:19 2014 - INFO | generate_script
Thu Aug 28 16:34:19 2014 - ERROR |
# *** ERROR ***
#
# There is a templating error preventing this file from rendering correctly.
#
# This is most likely not due to a bug in Cobbler and is something you can fix.
#
# Look at the message below to see what things are causing problems.
#
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
#
# Try fixing the problem and then investigate to see if this message goes
# away or changes.
#
#
# need more than 1 value to unpack
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 204, in render_cheetah
# data_out = t.respond()
#
# File "cheetah_DynamicallyCompiledCheetahTemplate_1409261659_45_92467.py", line 127, in respond
#
# File "cheetah_DynamicallyCompiledCheetahTemplate_1409261659_45_92467.py", line 70, in __errorCatcher1
#
# File "<string>", line 1, in <module>
#
# File "/usr/lib/python2.7/site-packages/cobbler/template_api.py", line 173, in SNIPPET
# result = BuiltinTemplate.SNIPPET(self, file)
#
# File "DynamicallyCompiledCheetahTemplate.py", line 88, in SNIPPET
#
# File "/usr/lib64/python2.7/site-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
# self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
#
# File "cheetah_DynamicallyCompiledCheetahTemplate_1409261659_65_55359.py", line 438, in respond
#
Thu Aug 28 16:34:19 2014 - INFO | Exception occured: <class 'cobbler.cexceptions.CX'>
Thu Aug 28 16:34:19 2014 - INFO | Exception value: 'Error templating file, check cobbler.log for more details'
Thu Aug 28 16:34:19 2014 - INFO | Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 2154, in _dispatch
return method_handle(*params)
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 1121, in generate_script
return self.api.generate_script(profile, system, name)
File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 701, in generate_script
return self.pxegen.generate_script("system", system, name)
File "/usr/lib/python2.7/site-packages/cobbler/pxegen.py", line 1102, in generate_script
return self.templar.render(template_data, blended, None, obj)
File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 112, in render
data_out = self.render_cheetah(raw_data, search_table, subject)
File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 211, in render_cheetah
raise CX("Error templating file, check cobbler.log for more details")
The following changes let the templating succeed:
diff --git a/snippets/post_install_network_config b/snippets/post_install_network_config
index 2b0e57c..8dcced7 100644
--- a/snippets/post_install_network_config
+++ b/snippets/post_install_network_config
@@ -173,7 +173,7 @@ cat >> $devfile << EOF
BONDING_OPTS="$bonding_opts"
EOF
#end if
- #elif $iface_type in ("bond_slave") and $iface_master != ""
+ #elif $iface_type == "bond_slave" and $iface_master != ""
echo "SLAVE=yes" >> $devfile
echo "MASTER=$iface_master" >> $devfile
echo "HOTPLUG=no" >> $devfile
diff --git a/snippets/post_install_network_config_deb b/snippets/post_install_network_config_deb
index c135ecb..697a3dd 100644
--- a/snippets/post_install_network_config_deb
+++ b/snippets/post_install_network_config_deb
@@ -97,7 +97,7 @@ echo "auto $iname" >> /etc/network/interfaces
## ===================================================================
#if $iface_type in ("bond","bonded_bridge_slave")
#pass
- #elif $iface_type in ("bond_slave") and $iface_master != ""
+ #elif $iface_type == "bond_slave" and $iface_master != ""
#pass
#elif $iface_type == "bridge"
#set $slave_ports = " ".join($bridge_slaves.get($iname,[]))
@@ -124,7 +124,7 @@ echo " netmask $netmask" >> /etc/network/interfaces
echo " mtu $mtu" >> /etc/network/interfaces
#end if
#end if
- #if $ip == "" and $iface_type in ("bond") and $is_vlan == "false"
+ #if $ip == "" and $iface_type == "bond" and $is_vlan == "false"
echo "iface $iname inet manual" >> /etc/network/interfaces
#set $bondslaves = ""
#for $bondiname in $ikeys
@@ -156,7 +156,7 @@ echo " mtu $mtu" >> /etc/network/interfaces
#if $netmask != ""
echo " netmask $netmask" >> /etc/network/interfaces
#end if
- #if $iface_type in ("bond")
+ #if $iface_type == "bond"
#set $bondslaves = ""
#for $bondiname in $ikeys
#set $bondidata = $interfaces[$bondiname]
@@ -177,7 +177,7 @@ echo " bond-$bondkey $bondvalue" >> /etc/network/interfaces
echo "iface $iname inet manual" >> /etc/network/interfaces
#end if
#end if
- #if $iface_type in ("bond_slave") and $iface_master != ""
+ #if $iface_type == "bond_slave" and $iface_master != ""
echo "bond-master $iface_master" >> /etc/network/interfaces
#end if
#if $enableipv6 == True and $ipv6_autoconfiguration == False
Thanks,
Nish
9 years, 8 months
Bug introduced by 9ed3431623f2 ("Re-order imports in cobbler/api.py.")
by Nishanth Aravamudan
The commit not only re-ordered the imports, but also changed how the
cobbler are performed.
This results in my test rig, when I try to navigate to a /cblr/svc/op
URL:
mod_wsgi (pid=23529): Exception occurred processing WSGI script '/var/www/cobbler/svc/services.py'.
Traceback (most recent call last):
File "/var/www/cobbler/svc/services.py", line 41, in application
from cobbler.services import CobblerSvc
File "/usr/lib/python2.7/site-packages/cobbler/services.py", line 28, in <module>
import config
File "/usr/lib/python2.7/site-packages/cobbler/config.py", line 47, in <module>
import serializer
File "/usr/lib/python2.7/site-packages/cobbler/serializer.py", line 30, in <module>
import api as cobbler_api
File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 30, in <module>
from cobbler import config
ImportError: cannot import name config
The URL successfully loads when the imports are of the form:
import clogger
Thanks,
Nish
9 years, 8 months
Bug introduced by a33b0d155654 ("More work on input validation.")
by Nishanth Aravamudan
Hi,
It looks like this hunk:
- if not codes.RE_IPV4_ADDRESS.match(addr):
- raise CX("Invalid IPv4 address format")
+ if not netaddr.valid_ipv4(addr):
+ raise CX("Invalid IPv4 address format (%s)" % addr)
+
+ if not netaddr.IPAddress(addr).is_hostmask():
+ raise CX("Invalid IPv4 host address (%s)" % addr)
+
+ return addr
is_hostmask returns True for basically the inverse of a netmask. So it
seems wrong to check for this for host addresses?
Thanks,
Nish
9 years, 8 months
Documentation
by Jörgen Maas
Hey all,
In the past the Cobbler manual has been split off from the cobbler source
tree and moved into the website repo. Since then we have never received any
patches to the documentation, i'd like to see more user involvement with
regards to the documentation.
To make contributing more easy i have started importing the documentation
back into the main cobbler repository. This process involves converting the
docs (from markdown) into the RST format which is unfortunately still
ongoing...
Also, the docs are now built using Sphinx and PDF versions will be included
in a new cobbler-docs package. For more online reading convenience i've
also setup a readthedocs.org account:
http://cobbler.readthedocs.org/en/latest/
This new documentation effort is targeted at the master branch which will
become Cobbler 3.0.0.
I'd like to invite anyone to help converting/improving our documentation!
Thanks!
--
Grtz,
Jörgen Maas
9 years, 8 months
[PATCH] Fix bug in commit 874541e17a4e ("Support virtio26 for generic qemu fallback")
by Nishanth Aravamudan
Looks like there was a missed comma before the new stanza.
Signed-off-by: Nishanth Aravamudan <nacc(a)linux.vnet.ibm.com>
diff --git a/config/distro_signatures.json b/config/distro_signatures.json
index ca7a9e2..2d1635a 100644
--- a/config/distro_signatures.json
+++ b/config/distro_signatures.json
@@ -760,7 +760,7 @@
"kernel_options":"",
"kernel_options_post":"",
"boot_files":[]
- }
+ },
"virtio26": {
"signatures":[],
"version_file":"",
9 years, 8 months
help
by Gunnar Thielebein
On 10. August 2014 14:00:07 MESZ, cobbler-devel-request(a)lists.fedorahosted.org wrote:
>Send cobbler-devel mailing list submissions to
> cobbler-devel(a)lists.fedorahosted.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.fedorahosted.org/mailman/listinfo/cobbler-devel
>or, via email, send a message with subject or body 'help' to
> cobbler-devel-request(a)lists.fedorahosted.org
>
>You can reach the person managing the list at
> cobbler-devel-owner(a)lists.fedorahosted.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of cobbler-devel digest..."
>
>
>Today's Topics:
>
> 1. Cobbler releases 2.4.7 and 2.6.4 (Jörgen Maas)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Fri, 8 Aug 2014 13:05:14 +0200
>From: Jörgen Maas <jorgen.maas(a)gmail.com>
>To: cobbler mailing list <cobbler(a)lists.fedorahosted.org>, cobbler
> development list <cobbler-devel(a)lists.fedorahosted.org>
>Subject: [cobbler-devel] Cobbler releases 2.4.7 and 2.6.4
>Message-ID:
> <CAL3dZDdm7Von6cA7WWPvDxxG6xU_x=xkmYCXwZ_pC1e_1imUKg(a)mail.gmail.com>
>Content-Type: text/plain; charset="utf-8"
>
>Hey all,
>
>Today we release Cobbler 2.4.7 and 2.6.4; both releases are very minor
>maintenance updates.
>
>2.4.7:
>Announcement:
>http://www.cobblerd.org/posts/2014/08/08/cobbler_2.4.7_released.html
>Downloads: http://www.cobblerd.org/downloads/2.4.x.html
>
>Please read the release notes:
>http://www.cobblerd.org/manuals/2.4.0/1/1_-_Release_Notes.html
>
>
>2.6.4:
>Announcement:
>http://www.cobblerd.org/posts/2014/08/08/cobbler_2.6.4_released.html
><http://www.cobblerd.org/posts/2014/07/18/cobbler_2.6.3_released.html>
>Downloads: http://www.cobblerd.org/downloads/2.6.x.html
>
>Please read the release notes:
>http://www.cobblerd.org/manuals/2.6.0/1/1_-_Release_Notes.html
><http://www.cobblerd.org/downloads/2.6.x.html>
>
>
>--
>Grtz,
>Jörgen Maas
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL:
><https://lists.fedorahosted.org/pipermail/cobbler-devel/attachments/201408...>
>
>------------------------------
>
>_______________________________________________
>cobbler-devel mailing list
>cobbler-devel(a)lists.fedorahosted.org
>https://lists.fedorahosted.org/mailman/listinfo/cobbler-devel
>
>
>End of cobbler-devel Digest, Vol 59, Issue 1
>********************************************
--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
9 years, 8 months