Project

General

Profile

Actions

Bug #8172

closed

Patch to make ping_hosts.sh faster and avoid carp deadlock

Added by Harry Coin about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Gateway Monitoring
Target version:
Start date:
12/07/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

Description

In /usr/local/bin/ping_hosts.sh we have
..
  1. Read in ipsec ping hosts and check the CARP status
    if [ -f /var/db/ipsecpinghosts ]; then
    IPSECHOSTS="/var/db/ipsecpinghosts"
    CURRENTIPSECHOSTS="/var/db/currentipsecpinghosts"
    IFVPNSTATE=`ifconfig $IFVPN | grep "carp: BACKUP vhid" | wc -l`

Please change that to

  1. Read in ipsec ping hosts and check the CARP status
    if [ -f /var/db/ipsecpinghosts && -s /var/db/ipsecpinghosts ]; then
    ...
    Because /var/db/ipsecpinghosts seems to get written by the gui at 0 bytes whether we use ipsec or not.
    Which causes the pinger to run ifconfig, which waits on a lock, which I think participates in a deadlock situation.
    And, even if it doesn't, there's no point in running a bunch of ifconfig commands when the file exists and is size 0.
Actions

Also available in: Atom PDF