Bug 846955 - unexpected error message from condor init.d script
Summary: unexpected error message from condor init.d script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor
Version: 2.2
Hardware: All
OS: Linux
low
low
Target Milestone: 2.3
: ---
Assignee: Timothy St. Clair
QA Contact: Tomas Rusnak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-09 09:11 UTC by Lubos Trilety
Modified: 2013-03-06 18:45 UTC (History)
5 users (show)

Fixed In Version: condor-7.8.3-0.1
Doc Type: Bug Fix
Doc Text:
Cause: Repeated calls to 'service condor restart' Consequence: Error output "/var/run/condor/condor_master.pid: No such file or directory" Fix: Update script process order Result: No error on restart
Clone Of:
Environment:
Last Closed: 2013-03-06 18:45:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0564 0 normal SHIPPED_LIVE Low: Red Hat Enterprise MRG Grid 2.3 security update 2013-03-06 23:37:09 UTC

Description Lubos Trilety 2012-08-09 09:11:54 UTC
Description of problem:
From time to time a condor init.d shell script prints something like this:
cat: /var/run/condor/condor_master.pid: No such file or directory

Probably the master.pid file is removed right after the test [ -f $1 ]; which leads to the error message.

This can be easily prevented by changing line 151 in /etc/init.d/condor file from
pid=`cat $1` &>/dev/null
to
pid=$(cat $1 2>/dev/null)


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

How reproducible:
30%

Steps to Reproduce:
1. Restart condor continuously using init.d script
2. See error output
  
Actual results:
There's error output
cat: /var/run/condor/condor_master.pid: No such file or directory

Expected results:
No error output will be presented when condor stops correctly

Additional info:

Comment 3 Tomas Rusnak 2012-11-28 10:53:48 UTC
Retested on RHEL5/6 - 32/64 with:

condor-7.8.7-0.5

Relevant part of /etc/init.d/condor script:
get_pid() {
    if [ -f $1 ]; then
        pid=$(cat $1 2>/dev/null)
        #pid=`cat $1` &>/dev/null
        if [ $? -ne 0 -o -z "$pid" ]; then
            return 2
        fi

        echo -n $pid
        return 0
    fi

    return 1
}

>>> VERIFIED

Comment 5 errata-xmlrpc 2013-03-06 18:45:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0564.html


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