Looks like the python tftpd has been broken since:
commit 3a25e6a6bf609168f41e4215397a0b4d299490e1
Author: James Cammarata <jimi(a)sngx.net>
Date: Thu Apr 5 00:54:13 2012 -0500
[BUGFIX] Don't allow Templar classes to be created without a valid
config
There are a LOT of places in the templar.py code that use
self.settings without checking to make sure a valid config was passed
in. This could cause random stack dumps when templating, so it's better
to force a config to be passed in. Thankfully, there were only two
pieces of code that actually did this, one of which was the tftpd
management module which was fixed elsewhere.
There's:
diff --git a/cobbler/templar.py b/cobbler/templar.py
index e0c733e..55b40e8 100644
--- a/cobbler/templar.py
+++ b/cobbler/templar.py
<snip>
- if config is not None:
- self.config = config
- self.api = config.api
- self.settings = config.settings()
- self.last_errors = []
-
</snip>
while tftpd.py calls templar without config:
templar = cobbler.templar.Templar(None)
So the question is what's the right way to fix it. Should tftpd pass a
valid config object or should templar allow calling with empty one?
-Lassi
On 2012-09-03 17:39, Lassi Pölönen wrote:
I recently upgraded my cobbler server from rhel6.2 to 6.3 and
apparently
cobbler had updated as well from cobbler-2.2.2-1.el6.noarch to
cobbler-2.2.3-2.el6.noarch. The problem is that clients now seem to get
tftp timeout.
Looking at the abrt generated backtrace:
templar.py:59:__init__:AttributeError: 'NoneType' object has no
attribute 'api'
Traceback (most recent call last):
File "/usr/sbin/tftpd.py", line 1147, in <module>
sys.exit(main())
File "/usr/sbin/tftpd.py", line 1125, in main
templar = cobbler.templar.Templar(None)
File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 59,
in __init__
self.api = config.api
AttributeError: 'NoneType' object has no attribute 'api'
Local variables in innermost frame:
logger: None
config: None
self: <cobbler.templar.Templar instance at 0x143ef80>
A bug in here or am I missing something? It used to work fine before and
if I change tftp module to in.tftpd, the clients will work. That's just
not a feasible option since it takes awfully long with the amount of
systems..