Hello,
https://github.com/jsabo/cobbler/commit/c1b321919d9b0d538ece19d7d855a64e2ddb...
Old style shell triggers aren't working right now. I saw a ticket https://fedorahosted.org/cobbler/ticket/530 and I think someone applied that code but it didn't fix the issue or maybe it was another issue? Anyway when you run old style post install triggers it's throwing an exception.
So if you use the kickstart_done snippet it runs something like this:
wget "http://192.168.69.3/cblr/svc/op/ks/system/testvm1-sab0" -O /var/log/cobbler.ks wget "http://192.168.69.3/cblr/svc/op/trig/mode/post/system/testvm1-sab0" -O /dev/null wget "http://192.168.69.3/cblr/svc/op/nopxe/system/testvm1-sab0" -O /dev/null
Running that manually results in:
[root@cobbler1-sab0 post]# wget "http://192.168.69.3/cblr/svc/op/trig/mode/post/system/testvm1-sab0" -O /dev/null --15:42:45-- http://192.168.69.3/cblr/svc/op/trig/mode/post/system/testvm1-sab0 Connecting to 192.168.69.3:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4 [text/plain] Saving to: `/dev/null'
100%[====================================================================================================================================================================================================>] 4 --.-K/s in 0s
15:42:45 (434 KB/s) - `/dev/null' saved [4/4]
[root@cobbler1-sab0 post]# Tue Mar 8 15:42:45 2011 - INFO | REMOTE run_install_triggers; user(?) Tue Mar 8 15:42:45 2011 - DEBUG | running python triggers from /var/lib/cobbler/triggers/install/post/* Tue Mar 8 15:42:45 2011 - DEBUG | running python trigger cobbler.modules.install_post_log Tue Mar 8 15:42:45 2011 - DEBUG | running python trigger cobbler.modules.install_post_report Tue Mar 8 15:42:45 2011 - DEBUG | running python trigger cobbler.modules.install_post_power Tue Mar 8 15:42:45 2011 - DEBUG | running shell triggers from /var/lib/cobbler/triggers/install/post/* Tue Mar 8 15:42:45 2011 - DEBUG | running shell trigger /var/lib/cobbler/triggers/install/post/test.sh Tue Mar 8 15:42:45 2011 - INFO | running: ['/var/lib/cobbler/triggers/install/post/test.sh', 'system', 'testvm1-sab0', None] Tue Mar 8 15:42:45 2011 - WARNING | failed to execute trigger: /var/lib/cobbler/triggers/install/post/test.sh
It doesn't like the None.
So here is a patch that checks for it before we add the args to the arg list and also fix the indentation. It was 4 and then 3 spaces sometimes....
Now it looks like:
[root@cobbler1-sab0 post]# wget "http://192.168.69.3/cblr/svc/op/trig/mode/post/system/testvm1-sab0" -O /dev/null --15:46:22-- http://192.168.69.3/cblr/svc/op/trig/mode/post/system/testvm1-sab0 Connecting to 192.168.69.3:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4 [text/plain] Saving to: `/dev/null'
100%[====================================================================================================================================================================================================>] 4 --.-K/s in 0s
15:46:22 (391 KB/s) - `/dev/null' saved [4/4]
[root@cobbler1-sab0 post]# Tue Mar 8 15:46:22 2011 - INFO | REMOTE run_install_triggers; user(?) Tue Mar 8 15:46:22 2011 - DEBUG | running python triggers from /var/lib/cobbler/triggers/install/post/* Tue Mar 8 15:46:22 2011 - DEBUG | running python trigger cobbler.modules.install_post_log Tue Mar 8 15:46:22 2011 - DEBUG | running python trigger cobbler.modules.install_post_report Tue Mar 8 15:46:22 2011 - DEBUG | running python trigger cobbler.modules.install_post_power Tue Mar 8 15:46:22 2011 - DEBUG | running shell triggers from /var/lib/cobbler/triggers/install/post/* Tue Mar 8 15:46:22 2011 - DEBUG | running shell trigger /var/lib/cobbler/triggers/install/post/test.sh Tue Mar 8 15:46:22 2011 - INFO | running: ['/var/lib/cobbler/triggers/install/post/test.sh', 'system', 'testvm1-sab0'] Tue Mar 8 15:46:22 2011 - INFO | received on stdout: Hi, my name is system testvm1-sab0 and I'm a newly added system
Tue Mar 8 15:46:22 2011 - DEBUG | received on stderr:
On Tue, 8 Mar 2011 10:50:36 -0500, Jonathan Sabo jsabo@criminal.org wrote:
Hello,
https://github.com/jsabo/cobbler/commit/c1b321919d9b0d538ece19d7d855a64e2ddb...
Old style shell triggers aren't working right now. I saw a ticket https://fedorahosted.org/cobbler/ticket/530 and I think someone applied that code but it didn't fix the issue or maybe it was another issue? Anyway when you run old style post install triggers it's throwing an exception.
Applied, thanks.
cobbler-devel@lists.fedorahosted.org