Bug 1071220

Summary: Satellite 5.6: cobbler triggers are not working
Product: Red Hat Satellite 5 Reporter: Jiří Mikulka <jmikulka>
Component: ProvisioningAssignee: Stephen Herr <sherr>
Status: CLOSED DUPLICATE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: high    
Version: 560CC: cperry, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-13 17:44:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 924189    

Description Jiří Mikulka 2014-02-28 10:16:00 UTC
Description of problem:
Execution of (pre/post install) trigger scripts fails with traceback on Satellite 5.6.

Version-Release number of selected component (if applicable):
Satellite 5.6.0 (Satellite-5.6.0-RHEL6-re20130927.0)
cobbler-2.0.7-39.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1) create pre/post install script
       echo -e '#!/bin/bash\necho "Hello world"' >  /var/lib/cobbler/triggers/install/{pre,post}/run.sh
       chmod 0755  /var/lib/cobbler/triggers/install/{pre,post}/run.sh
2) schedule machaine provisioning
3) check cobbler log
       tail -f /var/log/cobbler/cobbler.log
[...]
Fri Feb 28 05:06:03 2014 - INFO | REMOTE run_install_triggers; user(?)
Fri Feb 28 05:06:03 2014 - DEBUG | running python triggers from /var/lib/cobbler/triggers/install/pre/*
Fri Feb 28 05:06:03 2014 - DEBUG | running python trigger cobbler.modules.install_pre_log
Fri Feb 28 05:06:03 2014 - INFO | Exception occured: <type 'exceptions.IndexError'>
Fri Feb 28 05:06:03 2014 - INFO | Exception value: list index out of range
Fri Feb 28 05:06:03 2014 - INFO | Exception Info:
  File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 1759, in _dispatch
    return method_handle(*params)
   File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 1210, 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 861, in run_triggers
    rc = m.run(api, arglist, logger)
   File "/usr/lib/python2.6/site-packages/cobbler/modules/install_pre_log.py", line 23, in run
    ip      = args[2] # ip or "?"
[...]

Actual results:
traceback

Expected results:
no traceback, but the trigger script is executed

Additional info:
* this was fixed for Satellite 5.5 reported as bug 1028525
* probably a regression because the bug 1028525 fixed the issue for Satellite 5.6 during the stage validation

Comment 1 Stephen Herr 2014-08-13 17:44:58 UTC
Duplicate of bug 1057785 which is closed currentrelease.

*** This bug has been marked as a duplicate of bug 1057785 ***