Bug 478254 - MIGRATED_FROM_JIRA: Init Script handling Dangling PID
MIGRATED_FROM_JIRA: Init Script handling Dangling PID
Status: MODIFIED
Product: penrose
Classification: Retired
Component: Installation (Show other bugs)
2.0
All Linux
low Severity low
: ---
: ---
Assigned To: Endi Sukma Dewata
Ben Levenson
:
Depends On:
Blocks: 471500
  Show dependency treegraph
 
Reported: 2008-12-27 03:12 EST by Chandrasekar Kannan
Modified: 2016-01-28 17:00 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chandrasekar Kannan 2008-12-27 03:12:28 EST
In the script:
/usr/local/penrose-server-pro-2.0b5/bin/penrose-server.sh

There is a section that looks like this:

PENROSE_PID="$PENROSE_HOME/logs/penrose.pid"


if [ "$1" = "start" ] ; then

 if [ -f "$PENROSE_PID" ] ; then
   echo Penrose Server is running
   exit 1


The problem is that if the machine is rebooted, the $PENROSE_PID
file might still exist from the time the machine was last up
and running.  This was preventing the script from starting up
penrose properly (and this in fact is what was happening)
Additional Comments From jimyang dated Thu Mar 20 16:30:18 CDT 2008 
use running() that can be called to validate the pid.

running()
{
    [ -f $1 ] || return 1
    PID=$(cat $1)
    ps -p $PID >/dev/null 2>/dev/null || return 1
    return 0
}

it uses ps to validate the pid

refer to https://svn.codehaus.org/jetty/jetty/trunk/bin/jetty.sh

Additional Comments From jimyang dated Tue Apr 01 15:36:18 CDT 2008 
Using PS() to validate the process name. If PS(dangling_pid) != name of the actual process then we will delete the dangling PID and start the server.


=========================================================
Issue dump from jira
$VAR1 = {
          'priority' => '3',
          'customFieldValues' => [],
          'project' => 'PENROSE',
          'status' => '5',
          'components' => [
                            {
                              'name' => 'Installation',
                              'id' => '10016'
                            }
                          ],
          'reporter' => 'jimyang',
          'key' => 'PENROSE-289',
          'assignee' => 'jimyang',
          'summary' => 'Init Script handling Dangling PID',
          'id' => '10982',
          'updated' => '2008-04-01 15:36:18.0',
          'votes' => '0',
          'fixVersions' => [
                           {
                             'releaseDate' => '2008-04-07 00:00:00.0',
                             'sequence' => '28',
                             'name' => 'Penrose-2.0RC1',
                             'released' => 'true',
                             'id' => '10093',
                             'archived' => 'false'
                           }
                         ],
          'affectsVersions' => [],
          'description' => 'In the script:
/usr/local/penrose-server-pro-2.0b5/bin/penrose-server.sh

There is a section that looks like this:

PENROSE_PID="$PENROSE_HOME/logs/penrose.pid"


if [ "$1" = "start" ] ; then

 if [ -f "$PENROSE_PID" ] ; then
   echo Penrose Server is running
   exit 1


The problem is that if the machine is rebooted, the $PENROSE_PID
file might still exist from the time the machine was last up
and running.  This was preventing the script from starting up
penrose properly (and this in fact is what was happening)',
          'created' => '2008-03-20 16:29:19.0',
          'resolution' => '1',
          'type' => '1'
        };


=========================================================
Comment 1 Chandrasekar Kannan 2008-12-27 03:12:30 EST
Marking bug as MODIFIED as it was already resolved in Jira - PENROSE-289

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