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

Bug 846955

Summary: unexpected error message from condor init.d script
Product: Red Hat Enterprise MRG Reporter: Lubos Trilety <ltrilety>
Component: condorAssignee: Timothy St. Clair <tstclair>
Status: CLOSED ERRATA QA Contact: Tomas Rusnak <trusnak>
Severity: low Docs Contact:
Priority: low    
Version: 2.2CC: esammons, iboverma, matt, trusnak, tstclair
Target Milestone: 2.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 18:45:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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