Bug 723971

Summary: Daemons using read_condor_config crashes when <subsys>_LOG is not specified
Product: Red Hat Enterprise MRG Reporter: Luigi Toscano <ltoscano>
Component: condor-job-hooksAssignee: Robert Rati <rrati>
Status: CLOSED ERRATA QA Contact: Luigi Toscano <ltoscano>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 2.0CC: iboverma, matt, rrati, tstclair
Target Milestone: 2.0.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: condor-job-hooks-1.5-4 Doc Type: Bug Fix
Doc Text:
C: If a subsys.parameter definition didn't exist in MRG Grid's configuration, such as LL_DAEMON_LOG, then the value for LOG would be used, which is a directory instead of a file C: A confusing exception would be thrown F: Added option to control whether read_condor_config should look for the param without subsystem R: A configuration can now be guaranteed to use specific params and provide useful error messages
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-07 16:40:59 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: 681648, 718265, 723887    

Description Luigi Toscano 2011-07-21 16:26:15 UTC
Description of problem:
When the <subsys>_LOG is not specified, the 
This is due to a bug in read_condor_config which would probably affect all its users (according to developers, condor-wallaby, carod, caroniad, job_hooks)

Version-Release number of selected component (if applicable):
condor-7.6.1-0.10.el5
condor-classads-7.6.1-0.10.el5
condor-low-latency-1.1-3.el5
condor-job-hooks-1.5-3.el5
python-condorutils-1.5-3.el5


Configure low latency according to documentation and remove the definition of LL_DAEMON_LOG. Carod will crash with:

Traceback (most recent call last):
  File "/usr/sbin/carod", line 1085, in ?
    sys.exit(main())
  File "/usr/sbin/carod", line 953, in main
    base_logger = create_file_logger(log_name, file['log'], logging.INFO, size=size)
  File "/usr/lib/python2.4/site-packages/condorutils/log.py", line 23, in create_file_logger
    backupCount=bcknum)
  File "/usr/lib64/python2.4/logging/handlers.py", line 107, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding)
  File "/usr/lib64/python2.4/logging/handlers.py", line 59, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding)
  File "/usr/lib64/python2.4/logging/__init__.py", line 757, in __init__
    stream = open(filename, mode)
IOError: [Errno 21] Is a directory: '/var/log/condor'

See also https://bugzilla.redhat.com/show_bug.cgi?id=681648#c4

Comment 1 Robert Rati 2011-07-22 21:39:13 UTC
Added an optional arg to read_condor_config to determine if param should be looked up w/o a subsystem.

This results in required updates to the following packages:
condor-low-latency-1.2-2
condor-ec2-enhanced-1.2-2
condor-wallaby-4.1-3

Comment 2 Robert Rati 2011-07-25 15:36:56 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: If a subsys.parameter definition didn't exist in MRG Grid's configuration, such as LL_DAEMON_LOG, then the value for LOG would be used, which is a directory instead of a file
C: A confusing exception would be thrown
F: Added option to control whether read_condor_config should look for the param without subsystem
R: A configuration can now be guaranteed to use specific params and provide useful error messages

Comment 4 Luigi Toscano 2011-08-01 18:10:10 UTC
The new parameter for read_condor_config allows to raise an exception if the parameter (subsystem.param) does not exist, instead of simply claiming to have found the "param" form. In this case (carod), the LOG parameter is not enough, we need CAROD_LOG or, if not found (here was the missing check, because LOG was found) LL_DAEMON_LOG. The code which lookups for parameters in carod, caroniad, configd has been fixed as well to use the new parameter.

Verified on RHEL5.7/6.1, i386/x86_64.
condor-7.6.3-0.3.el5
condor-classads-7.6.3-0.3
condor-ec2-enhanced-1.2-2
condor-job-hooks-1.5-4
condor-low-latency-1.2-2
python-condorec2e-1.2-3
python-condorutils-1.5-4
condor-wallaby-client-4.1-4

Comment 5 errata-xmlrpc 2011-09-07 16:40:59 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/RHSA-2011-1249.html