Page MenuHomeVyOS Platform

Fix VRRP in nightly development builds
Closed, ResolvedPublic

Description

In jessie port support for vyatta-keepalived is abandoned in favor of upstream keepalived package. But the corresponding configuration key (--vyatta-workaround) was not removed from templates/scripts, which renders vrrp unusable - keepalived doen't want to start with unexpected arguments.

This key (--vyatta-workaround) looks to be a hook, toggling the following change in keepalived behavior: when administrator sends "restart vrrp " command, vyatta abandoned shared IP addresses untill next election, and original keepalived - does not. (As far as I understood the comments in code).

To make things work as intended, there are at least two options:

  1. Remove this key from

vyatta-vrrp/debian/vyatta-vrrp/opt/vyatta/share/perl5/Vyatta/Keepalived.pm

  1. Refresh vyatta-keepalived from upstream and port --vyatta-workaround code there again.

As for me - option 1. is better, but I have no idea on why vyatta team even wanted to introduce this key.

vyatta-workaround.png (148×800 px, 3 KB)

Event Timeline

Ok, now works, but I've got some strange notices on "show vrrp" :

given is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 90.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 91.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 94.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 97.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 100.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 103.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 106.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.

And some more, on the machine with working config:

Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.

These should be gone now.

In T74#1169, @mickvav wrote:

Ok, now works, but I've got some strange notices on "show vrrp" :

given is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 90.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 91.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 94.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 97.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 100.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 103.
when is experimental at /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl line 106.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.

https://github.com/vyos/vyatta-vrrp/commit/3130361a71b467fccd5bc08330153a7f7e8280b0

vyos@r1-80001# run sh ver

Version:          VyOS 999.201608110236
Built by:         autobuild@vyos.net
Built on:         Thu 11 Aug 2016 02:36 UTC
Build ID:         3d40633a-dce2-4448-9a03-cf13c82ca578

Architecture:     x86_64
Boot via:         installed image
System type:      VMware guest

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-42 27 23 12 f4 9d 8e fa-2b 78 e7 02 16 ce e1 8f
Hardware UUID:    42272312-F49D-8EFA-2B78-E70216CEE18F
Copyright:        VyOS maintainers and contributors

Interface configuration:

set interfaces ethernet eth0 duplex 'auto'
set interfaces ethernet eth0 hw-id '00:50:56:a7:ae:6b'
set interfaces ethernet eth0 smp-affinity 'auto'
set interfaces ethernet eth0 speed 'auto'
set interfaces ethernet eth0 vif 42 address '172.30.200.1/31'
set interfaces ethernet eth0 vif 42 description 'Utside'
set interfaces ethernet eth0 vif 42 firewall in name 'IN-ETH0'
set interfaces ethernet eth0 vif 42 firewall out name 'OUT-ETH0'
set interfaces ethernet eth0 vif 42 vrrp vrrp-group 101 advertise-interval '1'
set interfaces ethernet eth0 vif 42 vrrp vrrp-group 101 preempt 'false'
set interfaces ethernet eth0 vif 42 vrrp vrrp-group 101 priority '50'
set interfaces ethernet eth0 vif 42 vrrp vrrp-group 101 sync-group '80001'
set interfaces ethernet eth0 vif 42 vrrp vrrp-group 101 virtual-address '192.168.220.37/27'
set interfaces ethernet eth1 duplex 'auto'
set interfaces ethernet eth1 hw-id '00:50:56:a7:07:8e'
set interfaces ethernet eth1 smp-affinity 'auto'
set interfaces ethernet eth1 speed 'auto'
set interfaces ethernet eth1 vif 1727 address '172.30.200.13/31'
set interfaces ethernet eth1 vif 1727 description 'SERVICES=LINK'
set interfaces ethernet eth1 vif 1727 firewall in name 'IN-SERVICE'
set interfaces ethernet eth1 vif 1727 firewall out name 'OUT-SERVICE'
set interfaces ethernet eth1 vif 1727 vrrp vrrp-group 101 advertise-interval '1'
set interfaces ethernet eth1 vif 1727 vrrp vrrp-group 101 preempt 'false'
set interfaces ethernet eth1 vif 1727 vrrp vrrp-group 101 priority '50'
set interfaces ethernet eth1 vif 1727 vrrp vrrp-group 101 'run-transition-scripts'
set interfaces ethernet eth1 vif 1727 vrrp vrrp-group 101 sync-group '80001'
set interfaces ethernet eth1 vif 1727 vrrp vrrp-group 101 virtual-address '172.18.160.219/29'
set interfaces ethernet eth1 vif 1800 address '172.30.200.3/31'
set interfaces ethernet eth1 vif 1800 description 'DS-LAN'
set interfaces ethernet eth1 vif 1800 firewall in name 'IN-DS-LAN'
set interfaces ethernet eth1 vif 1800 firewall out name 'OUT-DS-LAN'
set interfaces ethernet eth1 vif 1800 vrrp vrrp-group 101 advertise-interval '1'
set interfaces ethernet eth1 vif 1800 vrrp vrrp-group 101 preempt 'false'
set interfaces ethernet eth1 vif 1800 vrrp vrrp-group 101 priority '50'
set interfaces ethernet eth1 vif 1800 vrrp vrrp-group 101 sync-group '80001'
set interfaces ethernet eth1 vif 1800 vrrp vrrp-group 101 virtual-address '172.23.254.1/24'
set interfaces ethernet eth1 vif 1801 address '172.30.200.5/31'
set interfaces ethernet eth1 vif 1801 description 'Link'
set interfaces ethernet eth1 vif 1801 firewall in name 'IN-LINK'
set interfaces ethernet eth1 vif 1801 firewall out name 'OUT-LINK'
set interfaces ethernet eth1 vif 1801 ip ospf dead-interval '4'
set interfaces ethernet eth1 vif 1801 ip ospf hello-interval '1'
set interfaces ethernet eth1 vif 1801 ip ospf priority '1'
set interfaces ethernet eth1 vif 1801 ip ospf retransmit-interval '5'
set interfaces ethernet eth1 vif 1801 ip ospf transmit-delay '1'
set interfaces ethernet eth1 vif 1801 vrrp vrrp-group 101 advertise-interval '1'
set interfaces ethernet eth1 vif 1801 vrrp vrrp-group 101 preempt 'false'
set interfaces ethernet eth1 vif 1801 vrrp vrrp-group 101 priority '50'
set interfaces ethernet eth1 vif 1801 vrrp vrrp-group 101 sync-group '80001'
set interfaces ethernet eth1 vif 1801 vrrp vrrp-group 101 virtual-address '172.24.31.249/29'
set interfaces ethernet eth1 vif 1804 address '172.30.200.7/31'
set interfaces ethernet eth1 vif 1804 description 'ARNE-NET'
set interfaces ethernet eth1 vif 1804 vrrp vrrp-group 101 advertise-interval '1'
set interfaces ethernet eth1 vif 1804 vrrp vrrp-group 101 preempt 'false'
set interfaces ethernet eth1 vif 1804 vrrp vrrp-group 101 priority '50'
set interfaces ethernet eth1 vif 1804 vrrp vrrp-group 101 sync-group '80001'
set interfaces ethernet eth1 vif 1804 vrrp vrrp-group 101 virtual-address '192.168.222.233/29'
set interfaces ethernet eth2 duplex 'auto'
set interfaces ethernet eth2 hw-id '00:50:56:a7:13:d1'
set interfaces ethernet eth2 smp-affinity 'auto'
set interfaces ethernet eth2 speed 'auto'
set interfaces ethernet eth2 vif 1802 address '172.18.254.3/31'
set interfaces ethernet eth2 vif 1802 description 'SYNC'
set interfaces ethernet eth2 vif 1802 ip ospf dead-interval '4'
set interfaces ethernet eth2 vif 1802 ip ospf hello-interval '1'
set interfaces ethernet eth2 vif 1802 ip ospf priority '1'
set interfaces ethernet eth2 vif 1802 ip ospf retransmit-interval '5'
set interfaces ethernet eth2 vif 1802 ip ospf transmit-delay '1'
set interfaces loopback lo address '172.18.255.3/32'

Output:

vyos@r1-80001# run sh vrrp 
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 286.
                                 RFC        Addr   Last        Sync
Interface         Group  State   Compliant  Owner  Transition  Group
---------         -----  -----   ---------  -----  ----------  -----
eth1.1727         101    MASTER  yes        no     1h9m50s     80001
eth1.1801         101    MASTER  yes        no     1h9m50s     80001
eth1.1804         101    MASTER  yes        no     1h9m50s     80001
eth0.42           101    MASTER  yes        no     1h9m50s     80001
eth1.1800         101    MASTER  yes        no     1h9m50s     80001
vyos@r1-80001# run sh vrrp det
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 240.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 243.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 240.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 243.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 240.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 243.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 240.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 243.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
Use of uninitialized value in string ne at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 240.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 243.
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
--------------------------------------------------
Interface: eth0.42
--------------
  Group: 101
  ----------
  State:                        MASTER
  Last transition:              1h14m33s

  RFC 3768 Compliant
  Virtual MAC interface:        
  Address Owner:                no

  Source Address:               
  Priority:                     50
  Advertisement interval:       1 sec
  Authentication type:          none
  Preempt:                      disabled

  Sync-group:                   80001

  VIP count:                    1
    192.168.220.37/27

Interface: eth1.1727
--------------
  Group: 101
  ----------
  State:                        MASTER
  Last transition:              1h14m33s

  RFC 3768 Compliant
  Virtual MAC interface:        
  Address Owner:                no

  Source Address:               
  Priority:                     50
  Advertisement interval:       1 sec
  Authentication type:          none
  Preempt:                      disabled

  Sync-group:                   80001

  VIP count:                    1
    172.18.160.219/29

Interface: eth1.1800
--------------
  Group: 101
  ----------
  State:                        MASTER
  Last transition:              1h14m33s

  RFC 3768 Compliant
  Virtual MAC interface:        
  Address Owner:                no

  Source Address:               
  Priority:                     50
  Advertisement interval:       1 sec
  Authentication type:          none
  Preempt:                      disabled

  Sync-group:                   80001

  VIP count:                    1
    172.23.254.1/24

Interface: eth1.1801
--------------
  Group: 101
  ----------
  State:                        MASTER
  Last transition:              1h14m33s

  RFC 3768 Compliant
  Virtual MAC interface:        
  Address Owner:                no

  Source Address:               
  Priority:                     50
  Advertisement interval:       1 sec
  Authentication type:          none
  Preempt:                      disabled

  Sync-group:                   80001

  VIP count:                    1
    172.24.31.249/29

Interface: eth1.1804
--------------
  Group: 101
  ----------
  State:                        MASTER
  Last transition:              1h14m33s

  RFC 3768 Compliant
  Virtual MAC interface:        
  Address Owner:                no

  Source Address:               
  Priority:                     50
  Advertisement interval:       1 sec
  Authentication type:          none
  Preempt:                      disabled

  Sync-group:                   80001

  VIP count:                    1
    192.168.222.233/29

[edit]
vyos@r1-80001#
vyos@r1-80001# run sh vrrp statistics 
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
--------------------------------------------------
Interface: eth0.42
--------------
  Group: 101
  ----------
  Advertisements:
    Received:                   91
    Sent:                       4521

  Became master:                1
  Released master:              0

  Packet errors:
    Length:                     0
    TTL:                        0
    Invalid type:               0
    Advertisement interval:     0
    Address List:               0

  Authentication Errors:
    Invalid type:               0
    Type mismatch:              0
    Failure:                    0

  Priority Zero Advertisements:
    Received                    1
    Sent                        0

Interface: eth1.1801
--------------
  Group: 101
  ----------
  Advertisements:
    Received:                   91
    Sent:                       4521

  Became master:                1
  Released master:              0

  Packet errors:
    Length:                     0
    TTL:                        0
    Invalid type:               0
    Advertisement interval:     0
    Address List:               0

  Authentication Errors:
    Invalid type:               0
    Type mismatch:              0
    Failure:                    0

  Priority Zero Advertisements:
    Received                    1
    Sent                        0

Interface: eth1.1727
--------------
  Group: 101
  ----------
  Advertisements:
    Received:                   91
    Sent:                       4521

  Became master:                1
  Released master:              0

  Packet errors:
    Length:                     0
    TTL:                        0
    Invalid type:               0
    Advertisement interval:     0
    Address List:               0

  Authentication Errors:
    Invalid type:               0
    Type mismatch:              0
    Failure:                    0

  Priority Zero Advertisements:
    Received                    1
    Sent                        0

Interface: eth1.1800
--------------
  Group: 101
  ----------
  Advertisements:
    Received:                   91
    Sent:                       4521

  Became master:                1
  Released master:              0

  Packet errors:
    Length:                     0
    TTL:                        0
    Invalid type:               0
    Advertisement interval:     0
    Address List:               0

  Authentication Errors:
    Invalid type:               0
    Type mismatch:              0
    Failure:                    0

  Priority Zero Advertisements:
    Received                    1
    Sent                        0

Interface: eth1.1804
--------------
  Group: 101
  ----------
  Advertisements:
    Received:                   91
    Sent:                       4521

  Became master:                1
  Released master:              0

  Packet errors:
    Length:                     0
    TTL:                        0
    Invalid type:               0
    Advertisement interval:     0
    Address List:               0

  Authentication Errors:
    Invalid type:               0
    Type mismatch:              0
    Failure:                    0

  Priority Zero Advertisements:
    Received                    1
    Sent                        0

[edit]
vyos@r1-80001#
vyos@r1-80001# run sh vrrp sync-group 
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
Use of uninitialized value $_[1] in pattern match (m//) at /usr/share/perl5/Sort/Versions.pm line 18.
--------------------------------------------------
Group: 80001
---------
  State: MASTER
  Monitoring:
    Interface: eth1.1800, Group: 101
    Interface: eth1.1801, Group: 101
    Interface: eth1.1804, Group: 101
    Interface: eth1.1727, Group: 101
    Interface: eth0.42, Group: 101

[edit]