Bug 723971 - Daemons using read_condor_config crashes when <subsys>_LOG is not specified
Summary: Daemons using read_condor_config crashes when <subsys>_LOG is not specified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-job-hooks
Version: 2.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: 2.0.1
: ---
Assignee: Robert Rati
QA Contact: Luigi Toscano
URL:
Whiteboard:
Depends On:
Blocks: 681648 718265 723887
TreeView+ depends on / blocked
 
Reported: 2011-07-21 16:26 UTC by Luigi Toscano
Modified: 2011-09-07 16:40 UTC (History)
4 users (show)

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
Clone Of:
Environment:
Last Closed: 2011-09-07 16:40:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1249 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Grid 2.0 security, bug fix and enhancement update 2011-09-07 16:40:45 UTC

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


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