Re: [Linux-ha-dev] Patch for pgsql

2011-06-15 Thread Serge Dubrouski
I screwed up with git so here is the patch attached. On Tue, Jun 14, 2011 at 12:44 PM, Serge Dubrouski serge...@gmail.comwrote: Hello - I've just sent a pull request from my fork of resource-agent git repository. Proposed patch adds better handling of probes, fixes one English misspelling

Re: [Linux-ha-dev] Patch for pgsql

2011-06-15 Thread Florian Haas
On 2011-06-15 14:26, Serge Dubrouski wrote: I screwed up with git so here is the patch attached. Nice, thanks. Is the pgsql ocft test case OK as it is in the repo? Cheers, Florian signature.asc Description: OpenPGP digital signature ___

Re: [Linux-ha-dev] Patch for pgsql

2011-06-15 Thread Serge Dubrouski
Yes it's right. Do you know how I can resync my fork to the upstream? On Wed, Jun 15, 2011 at 6:28 AM, Florian Haas florian.h...@linbit.comwrote: On 2011-06-15 14:26, Serge Dubrouski wrote: I screwed up with git so here is the patch attached. Nice, thanks. Is the pgsql ocft test case OK as

Re: [Linux-ha-dev] Patch for pgsql

2011-06-15 Thread Raoul Bhatia [IPAX]
On 06/15/2011 02:29 PM, Serge Dubrouski wrote: Yes it's right. Do you know how I can resync my fork to the upstream? git fetch upstream git rebase upstream/master provided that you've got a remote upstream, e.g. [remote upstream] url =

Re: [Linux-ha-dev] Patch for pgsql

2011-06-15 Thread Florian Haas
On 2011-06-15 14:26, Serge Dubrouski wrote: I screwed up with git so here is the patch attached. Merged. I took the liberty to split this into two patches, and drop the spelling fix because the original spelling is actually correct. :)

[Linux-ha-dev] Patch for pgsql

2011-06-14 Thread Serge Dubrouski
Hello - I've just sent a pull request from my fork of resource-agent git repository. Proposed patch adds better handling of probes, fixes one English misspelling and declares rc variable as local in some function where it's used. I hope I did everything right with git -- Serge Dubrouski.

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-28 Thread Lars Ellenberg
On Fri, Jun 25, 2010 at 08:22:35AM -0600, Serge Dubrouski wrote: On Fri, Jun 25, 2010 at 5:56 AM, Lars Ellenberg lars.ellenb...@linbit.com wrote: On Fri, Jun 25, 2010 at 01:49:32PM +0200, Dejan Muhamedagic wrote: On Fri, Jun 25, 2010 at 12:58:15PM +0200, Lars Ellenberg wrote: On Thu, Jun

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Dejan Muhamedagic
Hi, On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote: Attached is an improved patch. 1. It parses unix_socket_directory out from PostgreSQL configuration file and used its value as a default value of OCF_RESKEY_socketdir. (Perl is used for that) 2. It creates

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Lars Ellenberg
On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote: Attached is an improved patch. 1. It parses unix_socket_directory out from PostgreSQL configuration file and used its value as a default value of OCF_RESKEY_socketdir. (Perl is used for that) sed -n -e 's/#.*$//;

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Dejan Muhamedagic
On Fri, Jun 25, 2010 at 12:58:15PM +0200, Lars Ellenberg wrote: On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote: Attached is an improved patch. 1. It parses unix_socket_directory out from PostgreSQL configuration file and used its value as a default value of

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Lars Ellenberg
On Fri, Jun 25, 2010 at 01:49:32PM +0200, Dejan Muhamedagic wrote: On Fri, Jun 25, 2010 at 12:58:15PM +0200, Lars Ellenberg wrote: On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote: Attached is an improved patch. 1. It parses unix_socket_directory out from PostgreSQL

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Serge Dubrouski
On Fri, Jun 25, 2010 at 4:58 AM, Lars Ellenberg lars.ellenb...@linbit.com wrote: On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote: Attached is an improved patch. 1. It parses unix_socket_directory out from PostgreSQL configuration file and used its value as a default value of

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Serge Dubrouski
On Fri, Jun 25, 2010 at 5:56 AM, Lars Ellenberg lars.ellenb...@linbit.com wrote: On Fri, Jun 25, 2010 at 01:49:32PM +0200, Dejan Muhamedagic wrote: On Fri, Jun 25, 2010 at 12:58:15PM +0200, Lars Ellenberg wrote: On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote: Attached is an

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Serge Dubrouski
Hi, Dejan - What's the point of introducing check_binary2 ? The old version of script used to use have_binary for checking binary tools but then Florian replaced it with check_binary and threw away if statements. Now you kind of reversing it. Why? On Fri, Jun 25, 2010 at 4:22 AM, Dejan

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Serge Dubrouski
Dejan - After a second thought I think that your way of handling checking binaries is more appropriate since it allows that case statement down the script work properly. I'd like to add a small change to patch2 though. See attached. pgsql3.patch has a mistypo: +if [ -n $OCF_RESKEY_config -a

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Dejan Muhamedagic
Hi, On Fri, Jun 25, 2010 at 08:28:54AM -0600, Serge Dubrouski wrote: Hi, Dejan - What's the point of introducing check_binary2 ? The old version of script used to use have_binary for checking binary tools but then Florian replaced it with check_binary and threw away if statements. Now you

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Serge Dubrouski
That change is Ok. Attached is a patch to fix meta-data. On Fri, Jun 25, 2010 at 11:31 AM, Dejan Muhamedagic deja...@fastmail.fm wrote: Hi, On Fri, Jun 25, 2010 at 08:28:54AM -0600, Serge Dubrouski wrote: Hi, Dejan - What's the point of introducing check_binary2 ? The old version of script

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-25 Thread Dejan Muhamedagic
On Fri, Jun 25, 2010 at 11:48:31AM -0600, Serge Dubrouski wrote: That change is Ok. Attached is a patch to fix meta-data. Applied. Thanks! Dejan On Fri, Jun 25, 2010 at 11:31 AM, Dejan Muhamedagic deja...@fastmail.fm wrote: Hi, On Fri, Jun 25, 2010 at 08:28:54AM -0600, Serge Dubrouski

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-24 Thread Dejan Muhamedagic
On Wed, Jun 23, 2010 at 02:07:09PM +0200, Lars Ellenberg wrote: On Tue, Jun 22, 2010 at 10:05:10AM -0600, Serge Dubrouski wrote: Yes it is possible to parse it from postgresql.conf of from provided config file. Then that should be done, IMO. Otherwise it has to be changed in two places

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-24 Thread Serge Dubrouski
That was I though to do with one exception: check_socket_dir() {    if [ ! -d $1 ]    then           mkdir           chmod           chown     else if ! touch $OCF_RESKEY_socketdir/test_file then ocf_log err Can't create files in

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-24 Thread Serge Dubrouski
Attached is an improved patch. 1. It parses unix_socket_directory out from PostgreSQL configuration file and used its value as a default value of OCF_RESKEY_socketdir. (Perl is used for that) 2. It creates OCF_RESKEY_socketdir if it doesn't exist otherwise checks if PostgreSQL DBA use can create

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-23 Thread Dejan Muhamedagic
Hi, On Tue, Jun 22, 2010 at 10:05:10AM -0600, Serge Dubrouski wrote: Yes it is possible to parse it from postgresql.conf of from provided config file. But I'd rather not do that. One can set unix_socket_dir parameter to /tmp or /var/tmp or some other directory that shouldn't be owned by

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-23 Thread Lars Ellenberg
On Tue, Jun 22, 2010 at 10:05:10AM -0600, Serge Dubrouski wrote: Yes it is possible to parse it from postgresql.conf of from provided config file. Then that should be done, IMO. Otherwise it has to be changed in two places again, and it will be forgotten in one or the other, which will lead to

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-22 Thread Serge Dubrouski
Hello Dejan - Setting that parameter to /var/run/posgresql by default isn't correct. The value of that parameter has to correspond to the value of unix_socket_directory PostgreSQL configuration parameter. By default it's /tmp, not /var/run/postgresql. That's why nobody else complained on this

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-22 Thread Lars Ellenberg
On Tue, Jun 22, 2010 at 01:16:35PM +0200, Dejan Muhamedagic wrote: Hi Serge, On Mon, Jun 21, 2010 at 10:19:13AM -0600, Serge Dubrouski wrote: Hello - Some users reported a need for this patch to cover the situation with non-default unix socket directory in PostgreSQL configuration.

Re: [Linux-ha-dev] Patch for pgsql RA

2010-06-22 Thread Serge Dubrouski
Yes it is possible to parse it from postgresql.conf of from provided config file. But I'd rather not do that. One can set unix_socket_dir parameter to /tmp or /var/tmp or some other directory that shouldn't be owned by PostgreSQL user. I mead this parameter has to be used very carefully. There are