On Wed, Oct 6, 2010 at 8:42 AM, Dejan Muhamedagic <deja...@fastmail.fm> wrote: > Hi Serge, > > On Wed, Oct 06, 2010 at 06:51:05AM -0600, Serge Dubrouski wrote: >> On Wed, Oct 6, 2010 at 5:51 AM, Lars Ellenberg >> <lars.ellenb...@linbit.com> wrote: >> > On Wed, Oct 06, 2010 at 01:31:07PM +0900, renayama19661...@ybb.ne.jp wrote: >> >> Hi Serge, >> >> >> >> I confirm the movement of your patch from now on. >> >> And I am going to contribute the patch of the change of loglevel of the >> >> monitor processing at the time >> >> of the start. >> >> >> >> However, there is a problem to your this patch. >> >> The -q option of the monitor is lost. >> >> >> >> - runasowner -q "$OCF_RESKEY_psql $psql_options -c 'select now();'" >> >> + runasowner "$OCF_RESKEY_psql $psql_options -c >> >> '$OCF_RESKEY_monitor_sql'" >> > >> > Make sure you properly shellescape OCF_RESKEY_monitor_sql first, >> > or you'll get unexpected results -- it may contain single qutotes itself. >> >> Thanks. Attached is the final (I hope) version of this patch. > > runasowner "$OCF_RESKEY_psql $psql_options -c \"$OCF_RESKEY_monitor_sql\"" > > This version will expand some chars such as backquotes and > dollar (perhaps others). Is it likely that the sql code would > contain such chars? If so, then there should be a note about it > in the meta-data for the monitor_sql parameter. Otherwise, I > don't know how to prevent expansion unless inserting escape > chars, but that would probably turn out to be very messy.
I'd rather follow a pretty impressive Lars's shell-quoting workshop. Please see attached. > > Cheers, > > Dejan > >> > -- >> > : Lars Ellenberg >> > : LINBIT | Your Way to High Availability >> > : DRBD/HA support and consulting http://www.linbit.com >> > >> > DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. >> > _______________________________________________________ >> > 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/ >> > >> >> >> >> -- >> Serge Dubrouski. > > >> _______________________________________________________ >> 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/ > > _______________________________________________________ > 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/ > -- Serge Dubrouski.
pgsql_monitor_patch
Description: Binary data
_______________________________________________________ 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/