Page MenuHomeVyOS Platform

VRRP "uninitialized value in printf" on show vrrp interface
Closed, ResolvedPublic

Description

Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.

Just set up VRRP on a fresh 1.1.7 install and doing "show vrrp detail" gives me the followign warning and the output seems to be the same as "show vrrp interface eth0"

simon@rtr-b:~$ show vrrp detail
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
--------------------------------------------------
Interface: eth0
--------------
  Group: 100
  ----------
  State:                        MASTER
  Last transition:              5m28s

  Source Address:               
  Priority:                     50
  Advertisement interval:       1 sec
  Authentication type:          IPSEC_AH
  Preempt:                      enabled

  VIP count:                    1
    10.0.0.10/24

simon@rtr-b:~$ show vrrp interface eth0
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
--------------------------------------------------
Interface: eth0
--------------
  Group: 100
  ----------
  State:                        MASTER
  Last transition:              7m36s

  Source Address:               
  Priority:                     50
  Advertisement interval:       1 sec
  Authentication type:          IPSEC_AH
  Preempt:                      enabled

  VIP count:                    1
    10.0.0.10/24

simon@rtr-b:~$ show version
Version:      VyOS 1.1.7
Description:  VyOS 1.1.7 (helium)
Copyright:    2016 VyOS maintainers and contributors
Built by:     [email protected]
Built on:     Wed Feb 17 09:57:31 UTC 2016
Build ID:     1602170957-4459750
System type:  x86 64-bit
Boot via:     image
Hypervisor:   KVM
HW model:     Standard PC (i440FX + PIIX, 1996)
HW S/N:       Not Specified
HW UUID:      5A9E3F44-F3D0-F540-AB10-5EE4F40D8667
Uptime:       15:36:27 up  1:37,  1 user,  load average: 0.05, 0.03, 0.05

Details

Difficulty level
Easy (less than an hour)

Event Timeline

syncer triaged this task as Normal priority.
syncer added a project: VyOS 1.1.x (1.1.8).
syncer added a subscriber: syncer.

Hello, @tsumaru720, can you reproduce it on other system?
Can you post configs?
Thanks

Hi @syncer

I sadly only have the one VRRP pair and the other side of this router is an Ubiquiti EdgeRouter Lite running Edge OS (Which doesnt have this problem) :)

Config is attached - I've pruned some info (names and such) - Its a fairly basic setup{F1460}

I should add that this is a VM that does indeed only have a single interface - Its sole purpose is to sit waiting for my main router to die and if it does, assume the shared IP so it can forward things off to a different router (In the same subnet, but not in a position to run VRRP, hence this VM) :)

Ok, basicly the /tmp/keepalived.data format changed. There's no more OPMode.pm#250 in the output and it was replaced by 'Router ID: <n>' which could be used to do find_sync a bit cleaner. It could be in certain cases the multicast source IP is printed out but I'd have to check Keepalived sources to be sure. I could write it that it probes for a value and upon failure won't print out the Source IP or just remove that part all together. Any preferences: TL;DR: implement safer fail-back legacy behavior or YOLO it?

Commited into current, separate patch available for 117 users if needed be.

This fix didn't seem to make it into 1.1.8 - was it supposed to?

vyos@vyos:~$ show version
Version:      VyOS 1.1.8
Description:  VyOS 1.1.8 (helium)
Copyright:    2017 VyOS maintainers and contributors
Built by:     [email protected]
Built on:     Sat Nov 11 13:44:36 UTC 2017
Build ID:     1711111344-b483efc
System type:  x86 64-bit
Boot via:     image
Hypervisor:   Xen hvm
HW model:     HVM domU
...
vyos@vyos:~$ show vrrp detail 
Use of uninitialized value in printf at /opt/vyatta/share/perl5/Vyatta/VRRP/OPMode.pm line 249.
--------------------------------------------------
Interface: eth1
--------------
  Group: 1
  ----------
  State:                        MASTER
  Last transition:              9h5m37s

  Source Address:               
  Priority:                     20
  Advertisement interval:       1 sec
  Authentication type:          IPSEC_AH
  Preempt:                      enabled
...