Bug 856944 - cobbler triggers are not working
cobbler triggers are not working
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
541
Unspecified Linux
medium Severity low
: ---
: ---
Assigned To: Stephen Herr
Martin Minar
: EasyFix, Patch
Depends On:
Blocks: sat560-blockers 1028525
  Show dependency treegraph
 
Reported: 2012-09-13 04:07 EDT by Luc de Louw
Modified: 2016-07-03 20:57 EDT (History)
9 users (show)

See Also:
Fixed In Version: cobbler-2.0.7-37-sat
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1028525 (view as bug list)
Environment:
Last Closed: 2013-10-01 17:53:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 361053 None None None Never

  None (edit)
Description Luc de Louw 2012-09-13 04:07:38 EDT
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 09:20:49 EDT
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 15:31:49 EDT
Hi Luc, thanks for the patch! Committed to the thirdparty repo as c84178f650de858f948621f71283ff282d601a2b.
Comment 4 Martin Korbel 2013-09-27 09:35:17 EDT
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 17:53:20 EDT
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.