Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 480992

Summary: hook_prepare_job.py has an error handling bug on line 62
Product: Red Hat Enterprise MRG Reporter: Robert Rati <rrati>
Component: gridAssignee: Robert Rati <rrati>
Status: CLOSED ERRATA QA Contact: Jan Sarenik <jsarenik>
Severity: medium Docs Contact:
Priority: low    
Version: 1.1CC: iboverma, jsarenik, lbrindle, matt
Target Milestone: 1.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Grid bug fix C: An except line in the hook_prepare_job.py file was not assigning the exception to a variable. The exception handling code attempted to reference a variable that contained exception data. C: An error handling bug F: The code was corrected R: The bug no longer occurs The hook_prepare_job.py file contained an error handling bug, which was subsequently found and corrected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-03 09:19:45 UTC Type: ---
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: 527551    

Description Robert Rati 2009-01-21 16:21:37 UTC
Description of problem:
The hook_prepare_job.py has an error handling bug.  On line 62, the except line isn't assigning the exception to a variable, but the exception handling code it attempting to reference a variable expected to contain exception data.  This was found through code review.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Robert Rati 2009-01-22 16:07:10 UTC
This is now handled.  Fixed in:

condor-ec2-enhanced-hooks-1.0-11

Comment 3 Jan Sarenik 2009-03-09 16:03:17 UTC
# rpm -qf /usr/libexec/condor/hooks/hook_prepare_job.py
condor-job-hooks-1.0-5.el5

Comment 4 Jan Sarenik 2009-03-09 16:08:15 UTC
The file has not changed since condor-job-hooks-1.0-4.el5
It contains:

 59  # Receive the reply from the prepare_job notification 
 60  try:
 61     reply = socket_read_all(client_socket)
 62  except:
 63    close_socket(client_socket)
 64    raise general_exception(syslog.LOG_ERR, 'socket error %d: %s' % (error[0], error[1]))

Comment 5 Jan Sarenik 2009-03-09 16:11:44 UTC
according to Brew, the dates of build are:
  2008-12-05 for -4
  2009-02-13 for -5

I do not see any connection between condor-ec2-enhanced-hooks
and hooks_prepare_job.py

Please explain in case I am misled.

Comment 6 Robert Rati 2009-03-09 16:28:32 UTC
BZ is mislabelled, as the issue is with the Job Hooks used by low-latency/EC2E, not the Job Router hooks.  It also appears that the exception change hasn't made it into a build, so moving back to Assigned.

Comment 7 Robert Rati 2009-06-02 20:47:18 UTC
Fixed in

condor-job-hooks-1.0-6

Comment 8 Jan Sarenik 2009-09-07 08:44:47 UTC
Verified on condor-job-hooks-1.0-12.el5

It is vital to rebuild the condor-job-hooks brew package
with latest spec file (it seems to have all the needed changes)
as the current -12.el4 build requires condor-job-hooks-common
which was renamed to python-condor-job-hooks-common (see below).

Please rebuild RHEL4 packages at least. Thanks.

------------------------------------------------------------
though it is strange for the build date would suggest that
the spec file used had to be quite recent, this is what I
am getting on RHEL4:

FYI: yum update ends with the same dependency error
# yum --enablerepo=mrg-rhel4-devel install condor-job-hooks
Error: Missing Dependency: condor-job-hooks-common is needed by package condor-low-latency
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package condor-job-hooks.noarch 0:1.0-12.el4 set to be updated
--> Running transaction check
--> Processing Dependency: python-condor-job-hooks-common for package: condor-job-hooks
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package python-condor-job-hooks-common.noarch 0:1.0-12.el4 set to be updated
--> Running transaction check
--> Processing Dependency: condor-job-hooks-common for package: condor-low-latency
--> Finished Dependency Resolution

------------------------------------------------------------
# yum --enablerepo=mrg-rhel4-devel list condor-job-hooks
Loading "installonlyn" plugin
Setting up repositories
Reading repository metadata in from local files
Installed Packages
condor-job-hooks.noarch                  1.0-5.el4              installed       
Available Packages
condor-job-hooks.noarch                  1.0-12.el4             mrg-rhel4-devel

Comment 9 Robert Rati 2009-09-09 16:58:13 UTC
The issue there seems to be with the low-latency package wanting condor-job-hooks-common which has been renamed to python-..., but the condor-low-latency package in brew for RHEL4 is the same version as RHEL5 (1.0-19), and it depends on python-condor-job-hooks-common.  From your snippet, it looks like you're not updating condor-low-latency, which you will need to do as well.

Comment 10 Jan Sarenik 2009-09-16 09:49:41 UTC
Verified also on RHEL4, package condor-job-hooks-1.0-13.el4

Comment 11 Irina Boverman 2009-10-29 14:29:35 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
please see bug summary.

Comment 12 Lana Brindley 2009-11-04 02:36:25 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1 +1,3 @@
+Grid bug fix
+
 please see bug summary.

Comment 13 Lana Brindley 2009-11-04 03:27:47 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,3 +1,8 @@
 Grid bug fix
 
-please see bug summary.+C: An except line in the hook_prepare_job.py file was not assigning the exception to a variable. The exception handling code attempted to reference a variable that contained exception data.
+C: An error handling bug
+F: The code was corrected
+R: The bug no longer occurs
+
+The hook_prepare_job.py file contained an error handling bug, which was subsequently found and corrected.

Comment 15 errata-xmlrpc 2009-12-03 09:19:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1633.html