View Issue Details

IDProjectCategoryView StatusLast Update
0000122Pgpool-IIBugpublic2015-04-28 18:06
ReporterparaengguAssigned ToMuhammad Usama 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000122: pgpool-II 3.4.0 - if_up_cmd and if_down_cmd $_IP_$ substitution is too optimistic
DescriptionI have pgpool-II 3.4.0 installed along with virtual IP address control, via sudo and the ip command.

Whenever pgpool brings up the the virtual IP address, "$_IP_$" will be substituted until the next whitespace, rather than only the pattern itself.

This results in a wrong prefix length (/32) being configured, when the IP is brought up.

Steps To Reproducepgpool.conf settings:

delegate_IP = '192.0.2.10'
ifconfig_path = '/usr/bin'
if_up_cmd = 'sudo /bin/ip addr add $_IP_$/24 dev eth0'
if_down_cmd = 'sudo /bin/ip addr del $_IP_$/24 dev eth0'


Start pgpool-II, and check the the network interface after the VIP was brought up:

ip addr show dev eth0

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    inet 192.0.2.5/24 brd 192.0.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.0.2.10/32 scope global eth0 <------------
       valid_lft forever preferred_lft forever
Additional InformationIf I hard-code the IP address (if_up_cmd = 'sudo /bin/ip addr add 192.0.2.10/24 dev eth0'), pgpool-II brings the prefix up correctly (with a prefix length of /24 rather than /32).

The problem is probably to be found within the exec_ifconfig function of src/watchdog/wd_if.c:
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob;f=src/watchdog/wd_if.c;h=8d3dc231485501c9107ef1f00658b6a9ec0a797e;hb=c07ce977305e06e7948e59e0eef152dcd6103365#l174
TagsNo tags attached.

Issue History

Date Modified Username Field Change
2014-11-25 20:48 paraenggu New Issue
2014-11-28 14:07 t-ishii Assigned To => Muhammad Usama
2014-11-28 14:07 t-ishii Status new => assigned
2015-01-23 20:06 Muhammad Usama Note Added: 0000513
2015-04-28 18:06 Muhammad Usama Status assigned => resolved
2015-04-28 18:06 Muhammad Usama Resolution open => fixed