[pgpool-general: 2660] Re: bash script can't see env variables when run by pgpool

Yugo Nagata nagata at sraoss.co.jp
Wed Mar 26 15:41:45 JST 2014


On Fri, 21 Mar 2014 00:48:58 +0000
Gintautas Sulskus <gingaz at gmail.com> wrote:

> Hello,
> 
> ifconfig_path = '/home/ubuntu/apps/scripts'
> PgpoolAdmin description of ifconfig_path is: The path of a command to
> switch the IP address. I understand it as the path for if_up_cmd
> and if_down_cmd commands.

Yes, you are right.

> 
> if_up_cmd = 'pg_ni_up.sh up eth0:1 10.0.1.244 255.255.255.0'
> if_down_cmd = 'pg_ni_up.sh down eth0:1'
> 
> 
> PS. Is this mailing list the right place to discuss about PgpoolAdmin?
> In the latest PgpoolAdmin version "if_*up*_cmd " is described as "The
> command to bring *down* the virtual IP" and "if_*down*_cmd" as "The command
> to bring *up* the virtual IP". Clearly descriptions are mixed up.

Yes, discussions about pgpoolAdmin also are welcome.
Thanks for reporting. I'll fix the descriptions.

> 
> Gintautas
> 
> 
> On Mon, Mar 10, 2014 at 2:46 AM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
> 
> > Hi,
> >
> > On Sun, 9 Mar 2014 03:00:52 +0000
> > Gintautas Sulskus <gingaz at gmail.com> wrote:
> >
> > > Hello,
> > >
> > > I am trying to set up pgpool watchdog. For virtual IP control my plan is
> > to
> > > use bash scripts (if_up_cmd/if_down_cmd). In my script I use some
> > > environment variables.
> > >
> > > A strange thing occurs here. No matter under what user I run pgpool,
> > script
> > > can't pick up my custom environment variables from /etc/environment
> > > (including customised PATH). It still sees standard binaries like
> > ifconfig
> > > though.
> >
> > How do you configure pgpool.conf about if_up_cmd, if_down_cmd,
> > ifconfig_path?
> > pgpool see ifconfig commands on the path specified by these options.
> >
> > >
> > > Same script, when run manually by me, works under all users. Any ideas
> > what
> > > can be wrong?
> > >
> > > The only solution I have come up is to redefine env variables in the
> > script.
> > >
> > > Thanks.
> > >
> > > Best Regards,
> > > Gintas
> >
> >
> > --
> > Yugo Nagata <nagata at sraoss.co.jp>
> >
> 
> 
> 
> -- 
> Best Regards,
> Gintautas Sulskus


-- 
Yugo Nagata <nagata at sraoss.co.jp>


More information about the pgpool-general mailing list