Bug 74848

Summary: functions script incorrectly looks at base name for status checks
Product: [Retired] Red Hat Linux Reporter: Matt Vanecek <mevanecek>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DEFERRED QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-29 20:16:36 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:

Description Matt Vanecek 2002-10-02 06:08:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916

Description of problem:
In the status() function of /etc/rc.d/init.d/functions, the base name of the
process is queried.  This is the first check to determine the status of a
process.  It does not account for the fact that unique applications may share
the same base name, and therefore incorrectly reports that a process is running
when it is not.

For example, /usr/libexec/postfix/master and /usr/cyrus/bin/master.  Cyrus will
fail to start every time because it starts after postfix, and functions.status()
tells the cyrus script that "master" is already running.

Since the various init scripts tap into RedHat's functions, the functions should
be more intelligent in situations like this.  Using the entire path works with
pidof, and it's reasonable to consider that init scripts would have and use the
correct path information (e.g., /usr/cyrus/bin/master).

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


How reproducible:
Always

Steps to Reproduce:
1. Re-IPL
2. View boot sequence
3. Note that Postfix starts, and that later, cyrus does not start.  The cyrus
failure is directly attributable to the status received from functions.status(),
indicating "master" is already running.
	

Expected Results:  The correct results would be generated if functions.status()
used a "pidof /usr/cyrus/bin/master" instead of a "pidof /usr/cyrus/bin/master
|| pidof master".  This latter case will always be true if there is a different
application that has the same base name as one that is started later in the boot
sequence.

Additional info:

Comment 1 Bill Nottingham 2005-09-29 20:16:36 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

If this persists on a current release, such as Fedora Core 4, please open a new bug.