[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    [Linux-ha-dev] Re: Bug#268670: heartbeat does not start resource
From:       Horms <horms () verge ! net ! au>
Date:       2004-08-30 3:05:59
Message-ID: 20040830030557.GC16916 () verge ! net ! au
[Download RAW message or body]

On Sun, Aug 29, 2004 at 08:55:58PM +0200, Dr. Tilo Levante wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Horms wrote:
> 
> | On Sat, Aug 28, 2004 at 05:07:46PM +0200, Dr. Tilo Levante wrote:
> |
> |> Package: heartbeat Version: 1.2.2-11 Severity: normal Tags: patch
> |>
> |>
> |> I tried to start postgresql with heartbeat. It was never startet,
> |> because in /usr/lib/heartbeat/ResourceManager is a test for the
> |> process status which fails for postgres. postgres reports if it
> |> is not running: pg_ctl: postmaster or postgres not running and
> |> the script sees running and thins postgres is already running!
> |>
> |> here a fix for the problem: 183   case `$spath $arg status` in
> |> 184     *[Rr]unning*|*OK*)  return 0;; 185     *not [Rr]unning*)
> |> return 0;; 186     *)                  return 3;; 187   esac
> |
> |
> | Don't you want to return value to be 3 if postres reports it is
> | "not running" ?
> |
> | Does this solve your problem?
> |
> | # #       Since we're patterned after the LSB's init scripts, here
> | are #       the exit codes we should be returning for status... # #
> | 0       program is running #       1       program is dead and
> | /var/run pid file exists #       2       program is dead and
> | /var/lock lock file exists #       3       program is stopped #
> | 4-100   reserved for future LSB use #       100-149 reserved for
> | distribution use #       150-199 reserved for application use #
> | 200-254 reserved #
> |
> | we_own_resource() { arg=`resource2arg $1` spath=`scriptpath $1`;
> |
> | case `$spath $arg status` in *not [Rr]unning*)   return 3;;
> | *[Rr]unning*|*OK*)  return 0;; *)                  return 3;; esac
> | }
> |
> Yes, this is better, but yhou have to mask the space (\ ).

Understood

> Sorry, I mailed the report to early.
> 
> There is another problem in the postgresql script.
> if the .pid is there it always states that postgres is running without
> test.
> I send you a copy of my current (working) versiong of in another email.

That sounds like a problem that needs to be resolved in the postgresql
init script. Actually the original problem does to, but I am prepared
to incorpoarate a work-around into heartbeat.

-- 
Horms
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic