[Pacemaker] Patch for pgsql RA

Serge Dubrouski sergeyfd at gmail.com
Mon May 17 19:45:47 UTC 2010


Thanks. Then the patch will look like this:

--- a/heartbeat/pgsql	2010-05-03 01:20:16.000000000 -0600
+++ b/heartbeat/pgsql	2010-05-17 13:43:04.000000000 -0600
@@ -343,21 +343,10 @@

 # Validate most critical parameters
 pgsql_validate_all() {
-    if ! have_binary $SH
-    then
-        return $OCF_ERR_INSTALLED
-    fi
-
-    if ! have_binary $OCF_RESKEY_pgctl
-    then
-        return $OCF_ERR_INSTALLED
-    fi
-
-
-    if ! have_binary $OCF_RESKEY_psql
-    then
-        return $OCF_ERR_INSTALLED
-    fi
+    check_binary $SH
+    check_binary $OCF_RESKEY_pgctl
+    check_binary $OCF_RESKEY_psql
+    check_binary fuser

     return $OCF_SUCCESS
 }

The only reason for using $FUSER was the fact that it already existed
in .ocf-binaries but was marked for future elimination. There is no
real preference in using one way or another.

On Mon, May 17, 2010 at 1:32 PM, Florian Haas <florian.haas at linbit.com> wrote:
> Hi Serge,
>
> On 05/17/2010 07:50 PM, Serge Dubrouski wrote:
>> I'm really sorry but please disregard that patch. The more appropriate
>> would be these two attached patches.
>
>>  # Validate most critical parameters
>>  pgsql_validate_all() {
>> -    if ! have_binary $SH
>> +    if ! check_binary $SH
>>      then
>>          return $OCF_ERR_INSTALLED
>>      fi
>
> You can just do check_binary. No need for have_binary and any if test;
> check_binary just exits with $OCF_ERR_INSTALLED if it doesn't find the
> binary.
>
> Wrt the $FUSER patch, is it really necessary to specify the full path to
> fuser? Other RAs simply do check_binary <binary>, relying on <binary> to
> be found in the $PATH.
>
> Cheers,
> Florian
>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>



-- 
Serge Dubrouski.




More information about the Pacemaker mailing list