Bug 480992 - hook_prepare_job.py has an error handling bug on line 62
hook_prepare_job.py has an error handling bug on line 62
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: grid (Show other bugs)
1.1
All Linux
low Severity medium
: 1.2
: ---
Assigned To: Robert Rati
Jan Sarenik
:
Depends On:
Blocks: 527551
  Show dependency treegraph
 
Reported: 2009-01-21 11:21 EST by Robert Rati
Modified: 2009-12-03 04:19 EST (History)
4 users (show)

See Also:
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 04:19:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert Rati 2009-01-21 11:21:37 EST
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 11:07:10 EST
This is now handled.  Fixed in:

condor-ec2-enhanced-hooks-1.0-11
Comment 3 Jan Sarenik 2009-03-09 12:03:17 EDT
# rpm -qf /usr/libexec/condor/hooks/hook_prepare_job.py
condor-job-hooks-1.0-5.el5
Comment 4 Jan Sarenik 2009-03-09 12:08:15 EDT
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 12:11:44 EDT
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 12:28:32 EDT
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 16:47:18 EDT
Fixed in

condor-job-hooks-1.0-6
Comment 8 Jan Sarenik 2009-09-07 04:44:47 EDT
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 12:58:13 EDT
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 05:49:41 EDT
Verified also on RHEL4, package condor-job-hooks-1.0-13.el4
Comment 11 Irina Boverman 2009-10-29 10:29:35 EDT
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-03 21:36:25 EST
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-03 22:27:47 EST
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 04:19:45 EST
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

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