Bug 856944 - cobbler triggers are not working
Summary: cobbler triggers are not working
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning
Version: 541
Hardware: Unspecified
OS: Linux
medium
low
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: sat560-blockers 1028525
TreeView+ depends on / blocked
 
Reported: 2012-09-13 08:07 UTC by Luc de Louw
Modified: 2018-12-03 17:48 UTC (History)
9 users (show)

Fixed In Version: cobbler-2.0.7-37-sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1028525 (view as bug list)
Environment:
Last Closed: 2013-10-01 21:53:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch that fixes the trigger issue (586 bytes, patch)
2012-09-13 08:07 UTC, Luc de Louw
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1028525 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Knowledge Base (Solution) 361053 0 None None None Never

Internal Links: 1028525

Description Luc de Louw 2012-09-13 08:07:38 UTC
Created attachment 612370 [details]
Patch that fixes the trigger issue

Description of problem:
Cobbler triggers are not working as ecxpected. They are failing, even a shell script which just contains exit 0


Version-Release number of selected component (if applicable):
2.0.7-14.6

How reproducible:
Always

Steps to Reproduce:
1. Put a script in i.e. /var/lib/cobbler/triggers/install/post/
2. Start installing a system
3. See the trigger script failing in /var/log/cobbler/cobbler.log
  
Actual results:
Trigger scripts are failing

Expected results:
Triggers should be executed

Additional info:
This issue has been fixed upstream. Please have a look at https://github.com/jsabo/cobbler/commit/c1b321919d9b0d538ece19d7d855a64e2ddb8804

Attached is a no-brainer patch derived from the git commit mentioned above

Comment 1 Tomas Lestach 2013-05-23 13:20:49 UTC
The correct link is: https://github.com/cobbler/cobbler/commit/1a29ffba62b3a7a901f3631acc143ce563789944

Note: We already use the patch in Spacewalk.

Comment 2 Stephen Herr 2013-07-17 19:31:49 UTC
Hi Luc, thanks for the patch! Committed to the thirdparty repo as c84178f650de858f948621f71283ff282d601a2b.

Comment 4 Martin Korbel 2013-09-27 13:35:17 UTC
Stage validated with Satellite-5.6.0-RHEL5-re20130926.0-x86_64.

1. create script
> echo -e '#!/bin/bash\necho "Hello world"' >  /var/lib/cobbler/triggers/install/post/run.sh
> chmod 0755  /var/lib/cobbler/triggers/install/post/run.sh
2. provision a machine
3. open log
> tail -f /var/log/cobbler/cobbler.log
....
Sat Sep 28 03:33:50 2013 - INFO | REMOTE generate_kickstart; user(?)
Sat Sep 28 03:33:50 2013 - INFO | generate_kickstart
Sat Sep 28 03:33:50 2013 - INFO | REMOTE run_install_triggers; user(?)
Sat Sep 28 03:33:50 2013 - DEBUG | running python triggers from /var/lib/cobbler/triggers/install/post/*
Sat Sep 28 03:33:50 2013 - DEBUG | running python trigger cobbler.modules.install_post_log
Sat Sep 28 03:33:50 2013 - DEBUG | running python trigger cobbler.modules.install_post_report
Sat Sep 28 03:33:50 2013 - DEBUG | running python trigger cobbler.modules.install_post_power
Sat Sep 28 03:33:50 2013 - DEBUG | running shell triggers from /var/lib/cobbler/triggers/install/post/*
Sat Sep 28 03:33:50 2013 - DEBUG | running shell trigger /var/lib/cobbler/triggers/install/post/run.sh
Sat Sep 28 03:33:50 2013 - INFO | running: ['/var/lib/cobbler/triggers/install/post/run.sh', 'profile', 'RHEL-4-x86_64:1:RedHatInc', '10.34.131.211']
Sat Sep 28 03:33:50 2013 - INFO | received: Hello world.
....

Comment 5 Clifford Perry 2013-10-01 21:53:20 UTC
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1395.html


Note You need to log in before you can comment on or make changes to this bug.