[pgpool-general: 7770] Re: if_up_cmd, if_down_cmd, arping_path questions

Bo Peng pengbo at sraoss.co.jp
Tue Oct 12 13:22:35 JST 2021


Hello,

> I have 2 questions about the above commands:
> 
> 1 - In the examples given on pgpool website, they are used as follows:
> 
> if_up_cmd = '/usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev enp0s8 label
> enp0s8:0'
> if_down_cmd = '/usr/bin/sudo /sbin/ip addr del $_IP_$/24 dev enp0s8'
> arping_cmd = '/usr/bin/sudo /usr/sbin/arping -U $_IP_$ -w 1 -I enp0s8'
> 
> I can replace enp0s8 with eth0, or anything that I receive from running
> an ifconfig command.
> 
> My current ifconfig invocation returns me 2 interfaces:
> ens5 (my private IP) and lo (loopback 127.0.0.1)
> 
> My question is:
> 
> Should I use this existing ens5 (or renamed to anything using netplan)
> interface
> to attach/detach the virtual IP, or should I create an extra network
> interface (Reserved to be used in above 3 commands) just for that purpose?
> (I fear that if I use existing interface, the virtual IP attachment will
> drop the private IP and my node will be addressless in the network, but I
> could be wrong)

You need to replcace "enp0s8" with "ens5".

if_up_cmd = '/usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev ens5 label ens5:0'
if_down_cmd = '/usr/bin/sudo /sbin/ip addr del $_IP_$/24 dev ens5'
arping_cmd = '/usr/bin/sudo /usr/sbin/arping -U $_IP_$ -w 1 -I ens5'

> 2 - There is wd_escalation_command and wd_de_escalation_command for AWS,
> and they will apply to me as well since my servers are there.
> 
> Are they necessary along with if_up_cmd, if_down_cmd, arping_path, or the
> wd_escalation_command/wd_de_escalation_command are replacements of
> if_up_cmd, if_down_cmd, arping_path?

The setting of "if_up_cmd, if_down_cmd, arping_path" is required.

"wd_escalation_command/wd_de_escalation_command" is optional.


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
http://www.sraoss.co.jp/


More information about the pgpool-general mailing list