Project

General

Profile

Bug #8586

Gateway Group trigger level

Added by Mauro Parente 9 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Gateways
Target version:
Start date:
06/20/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
All
Affected Architecture:
All

Description

Hi to all,
i think there is a problem using trigger level in gateway group other than "member down".

In function "return_gateway_groups_array" in file "/etc/inc/gwlb.inc" there is a check over the gateway group trigger, but it cannot work, because in config the trigger is saved as integer (0, 1, 2, 3) while the check try to find word ("loss", "latency").

Someone can confirm that?

CONFIG

Array
(
    [0] => Array
        (
            [name] => GW_WAN_GROUP_01
            [item] => Array
                (
                    [0] => WAN_UMTSGW|1|_vip5a60be577ad2b
                    [1] => WAN_VSATGW|2|_vip5a4bc724a886d
                )

            [trigger] => 0
            [descr] =>
        )

    [1] => Array
        (
            [name] => WAN_GROUP_PROD
            [item] => Array
                (
                    [0] => WAN_VSATGW|2|_vip5a4bc724a886d
                )

            [trigger] => 1
            [descr] =>
        )

    [2] => Array
        (
            [name] => WAN_GROUP_EMER
            [item] => Array
                (
                    [0] => WAN_UMTSGW|1|address
                    [1] => WAN_VSATGW|2|address
                )

            [trigger] => 0
            [descr] =>
        )

)

CHECK

                                        if (stristr($status['status'], "down")) {
                                                $msg = sprintf(gettext('MONITOR: %1$s is down, omitting from routing group %2$s'), $gwname, $group['name']);
                                                $gwdown = true;
                                        } else if (stristr($status['status'], "loss") && strstr($group['trigger'], "loss")) {
                                                /* packet loss */
                                                $msg = sprintf(gettext('MONITOR: %1$s has packet loss, omitting from routing group %2$s'), $gwname, $group['name']);
                                                $gwdown = true;
                                        } else if (stristr($status['status'], "delay") && strstr($group['trigger'] , "latency")) {
                                                /* high latency */
                                                $msg = sprintf(gettext('MONITOR: %1$s has high latency, omitting from routing group %2$s'), $gwname, $group['name']);
                                                $gwdown = true;
                                        }

Associated revisions

Revision 9fa8c7de (diff)
Added by Jim Pingle 9 months ago

Make GUI/config values for gateway groups match what the backend code expects. Fixes #8586

History

#1 Updated by Jim Thompson 9 months ago

  • Assignee set to Jim Pingle
  • Priority changed from High to Normal
  • Target version set to 2.4.4

#2 Updated by Jim Pingle 9 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by Chris Macmahon 9 months ago

2.4.4-DEVELOPMENT (amd64)
built on Fri Jul 06 15:23:49 EDT 2018
FreeBSD 11.2-RELEASE

2 gateways, setup a failover and a load balance groups.

Introduced packet loss/latency, on one of the wan links the other took over and worked as expected in a fail over setup.

Removed packet loss/latency on link and the link came back up.

Tested OK

#4 Updated by Jim Pingle 8 months ago

  • Status changed from Feedback to Resolved
  • Affected Version set to All
  • Affected Architecture set to All

Also available in: Atom PDF