View Issue Details

IDProjectCategoryView StatusLast Update
0000338pgpool-HABugpublic2018-12-04 10:51
Reportercpazdersky Assigned Topengbo  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionopen 
Summary0000338: watchdog virtual IP
DescriptionI am in the process of clustering two instances of pgpool-II using watchdog's virtual IP. When starting pgpool, the configuration performs an "ifconfig up" command to ensure that the network device is functioning before assigning it the defined virtual IP address. When I check pool's log file it informs me that the virtual IP assignment failed because the "ifconfig up" command errors out. My lone network device on this host is called "ens32." When I run the command "ifconfig ens32 up," the command works. If I run simply "ifconfig up" I receive an error stating "error fetching interface information: Device not found." So I tried renaming my network device to "eth0", which is usually Red Hat's default device name....and the "ifconfig up" command still failed with the same error. Basically, I have no idea which network device "ifconfig up" is trying to look at and until I figure that out I won't be able to cluster my pool instances. Any ideas?
TagsNo tags attached.

Activities

pengbo

2017-09-08 10:30

developer   ~0001703

Try to edit "if_up_cmd" and "if_down_cmd" parameter in pgpool.conf using your network device name instead of "eth0".

cpazdersky

2017-09-08 22:15

reporter   ~0001704

I should have included this info before.....I already tried that.

Also, when I run that same command manually on the command-line it works fine.

It seems like whenever the conf file runs the ifconfig up command, it just fails to find the network interface. I suppose it could be a Red Hat issue.

cpazdersky

2017-09-09 04:11

reporter   ~0001705

Issue resolved. After some troubleshooting and log-inspection, it appears that the problem was that the a couple of the commands in the pgpool.conf file require root privileges. Naturally I didn't use root as the owner/operator of the service on install so it was attempting to run "ifconfig" as an underpriveleged account.

I went into the service's boot file and changed the "run as" to root.

I suppose another workaround would be to add the user to sudoers and specify the ifconfig command in his permissions.

pengbo

2017-09-11 09:13

developer   ~0001706

It's great that you have resolved the issue.
I see. It's because of the command privilege.

Or you can do like the following 2 ways.

(1)
  # chmod 4755 /sbin/ifconfig
  # chmod 4755 /sbin/arping

(2)

Also you can copy the "ifconfig" and "arping" commands to a specific directory,
then give the directory access privilege only to application user, and mark the copied commands as setuid.

Then specify the directory path to "ifconfig_path" and "arping_path" paramaters of pgpool.conf.

Issue History

Date Modified Username Field Change
2017-09-08 05:44 cpazdersky New Issue
2017-09-08 10:30 pengbo Note Added: 0001703
2017-09-08 22:15 cpazdersky Note Added: 0001704
2017-09-09 04:11 cpazdersky Note Added: 0001705
2017-09-11 09:13 pengbo Note Added: 0001706
2018-12-04 10:51 administrator Assigned To => pengbo
2018-12-04 10:51 administrator Status new => closed