Project

General

Profile

Actions

Bug #8172

closed

Patch to make ping_hosts.sh faster and avoid carp deadlock

Added by Harry Coin over 6 years ago. Updated over 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 #1

Updated by Jim Pingle over 6 years ago

  • Assignee set to Jim Pingle
  • Target version set to 2.4.2-p1
  • Affected Version set to All
  • Affected Architecture All added
  • Affected Architecture deleted ()

It wasn't quite as simple as changing that one line, but I made a change that should have the same net effect.

Actions #2

Updated by Jim Pingle over 6 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Jim Pingle over 6 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF