Answering to myself-
After looking at recent commits on the github, I found commit 596579e
that was pushed 3 days ago. I manually made the change to the code and
the problem is gone now! What a timing!
Thanks!
Leon
On 07/13/2012 10:13 AM, Leonid Flaks wrote:
Hi!
I am trying to run a post trigger, which is part of standard
kickstart_done snippet - looks like this in a snippet - wget
\"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -O /dev/null" % (srv,
"system", system_name)
Everything renders properly, but I have a following error in
/var/log/httpd/error_log file on cobbler server:
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] mod_wsgi
(pid=16228): Exception occurred processing WSGI script
'/var/www/cobbler/svc/services.py'.
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] Traceback (most
recent call last):
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] File
"/var/www/cobbler/svc/services.py", line 83, in application
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] content = func(
**form )
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] File
"/usr/lib/python2.6/site-packages/cobbler/services.py", line 152, in trig
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] rc =
self.remote.run_install_triggers(mode,"system",system,ip)
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] return
self.__send(self.__name, args)
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X]
verbose=self.__verbose
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] return
self._parse_response(h.getfile(), sock)
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] return u.close()
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] File
"/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] raise
Fault(**self._stack[0])
[Fri Jul 13 09:30:17 2012] [error] [client X.X.X.X] Fault: <Fault 1:
"<type 'exceptions.NameError'>:global name 'config' is not
defined">
Similar error is logged in /var/log/cobbler/cobbler.log:
Fri Jul 13 09:54:05 2012 - INFO | REMOTE run_install_triggers; user(?)
Fri Jul 13 09:54:05 2012 - DEBUG | running python triggers from
/var/lib/cobbler/triggers/install/post/*
Fri Jul 13 09:54:05 2012 - DEBUG | running python trigger
cobbler.modules.install_post_report
Fri Jul 13 09:54:05 2012 - INFO | Exception occured: <type
'exceptions.NameError'>
Fri Jul 13 09:54:05 2012 - INFO | Exception value: global name 'config'
is not defined
Fri Jul 13 09:54:05 2012 - INFO | Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 1970,
in _dispatch
return method_handle(*params)
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line
1299, 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.6/site-packages/cobbler/utils.py", line 919,
in run_triggers
rc = m.run(api, arglist, logger)
File
"/usr/lib/python2.6/site-packages/cobbler/modules/install_post_report.py",
line 87, in run
message =
templar.Templar(config.Config(api.BootAPI)).render(input_data, metadata,
None)
Same error is generated if I run the wget command manually.
Interestingly enough similar 'pre' trigger works just fine.
Anybody else see that or is just me?
Thanks,
Leon