I am currently following this guide to setup a PG HA cluster. https://www.itenlight.com/blog/2016/05/18/PostgreSQL+HA+with+pgpool-II+-+Part+1
The problem I am having is the Virtual IP for the cluster doesn't get added in my network interfaces. I have a three node cluster in master-slave mode.
according to the guide (and pgpool documentation) http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave_3.3/en.html#config_pgpool under "PGPool-II Configuration" and "Virtual IP", I have to pick an IP address (which I have confirmed) that is not being used on the network, and set the configuration as described in the guide.
# - Virtual IP control Setting -
delegate_IP = '192.168.1.95'
if_cmd_path = '/bin'
if_up_cmd = 'ip_w addr add 192.168.1.95 dev eth0 label eth0:0'
if_down_cmd = 'ip_w addr del 192.168.1.95 dev eth0'
arping_path = '/usr/bin'
arping_cmd = 'arping_w -U $_IP_$ -w 1'
the "ip_w" and "arping_w" are just wrappers that live in the same directory as the original commands but force the commands to run as root by using sudo.
I have also successfully tested using the command (and the wrappers as the guide suggests) by adding the command to the sudoers file with the postgres user. If I execute this command as said user, I can add the IP address just fine to whichever node I executed it on as root.
Also, just for the heck of it, I disabled my firewall to ensure there were no surprises. Whenever I test a change, I am always greeted with the same log responses,
There is one interesting thing to note....When I manually add the interface to any node via the same "if_up_cmd" and switching to the postgres user, if I trigger the virtual IP failover to another node, the node will return with a success in the logs, but no virtual IP will be displayed (so basically it failed).
I have gone over all of my configuration and am struggling to find a solution. If anyone has setup HA, used this guide, or had this problem (or any idea as to what it could be) your input would be incredibly helpful.
EDIT: also I would like to add that I enabled verbose logging already and didn't get any useful information. I have also attempted this on all three servers and they all respond the same way. I also had the if_up_cmd as the original statement and switched it to a hard coded value to ensure there was no room for interpretation by the method executing it.
ip_w addr add $_IP_$/24 dev eth0 label eth0:0